Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CREATE LAYOUT

Synopsis

CREATE LAYOUT module.Name
{
    widget_tree
}

Description

Creates a page layout in the specified module. Layouts define the overall structure of pages – they typically include a header, navigation, content placeholder, and footer. Pages reference a layout via the Layout property.

Layout creation in MDL has limited support. Most Mendix projects use layouts provided by the Atlas UI module (e.g., Atlas_Core.Atlas_Default, Atlas_Core.PopupLayout) rather than creating custom layouts through MDL. For advanced layout customization, use Mendix Studio Pro.

Common Atlas Layouts

These layouts are available in most Mendix projects that include Atlas Core:

LayoutDescription
Atlas_Core.Atlas_DefaultStandard responsive page with sidebar navigation
Atlas_Core.Atlas_TopBarPage with top navigation bar
Atlas_Core.PopupLayoutModal popup dialog
Atlas_Core.Atlas_Default_NativePhoneNative mobile layout

Parameters

module.Name
The qualified name of the layout (Module.LayoutName).

Examples

Reference an existing layout when creating a page:

CREATE PAGE MyModule.Dashboard
(
    Title: 'Dashboard',
    Layout: Atlas_Core.Atlas_Default
)
{
    CONTAINER cntMain {
        DYNAMICTEXT txtWelcome (Attribute: WelcomeMessage)
    }
};

Reference a popup layout for a dialog page:

CREATE PAGE MyModule.ConfirmDelete
(
    Params: { $Item: MyModule.Item },
    Title: 'Confirm Delete',
    Layout: Atlas_Core.PopupLayout
)
{
    DATAVIEW dvItem (DataSource: $Item) {
        DYNAMICTEXT txtMessage (Attribute: Name)
        FOOTER footer1 {
            ACTIONBUTTON btnDelete (Caption: 'Delete', Action: DELETE, ButtonStyle: Danger)
            ACTIONBUTTON btnCancel (Caption: 'Cancel', Action: CANCEL_CHANGES)
        }
    }
};

See Also

CREATE PAGE, SHOW PAGES