Hi Volen Todorov,
Within the Mendix model you have the ability to use layouts, pages and snippets to support flexibility, maintenance and reusing components. When the model is deployed to run as an application that structure of reusing is removed. Each page definition contains the code of the layouts, page and snippets in one set. The Mendix runtime optimizes the page switches to prevent complete rendering of each page.
So it become really difficult to almost impossible to remove the layout of a rendered page. The best is so duplicate a page in a normal layout (in content pages) and a popuplayout (widget use) and use snippets to define a page 1 time.
To have exact code example have a look at the Dataview Loader widget in the appstore or in Github