Element.getLayout (Method)

Returns the selected layout type which will either be the ID of a render handler, the ID of a display template, or -1 for the Standard Rendering.

Returns:

Element_GetLayout_Result (struct)

Each row of the returned query results has the following fields:

Field Name Type Description
DisplayTemplateID DisplayTemplateID_0 If the layout supports calling the standard handler, this is the ID of the display template to be invoked, or zero (0) for the standard rendering.
LayoutID ID_NEG1_NEG2 The ID of the selected layout type which will either be the ID of a render handler, the ID of a display template, -1 for the Standard Rendering, or -2 for default rendering.
LayoutType LayoutType The selected layout type which can be 'Standard', 'Render Handler', 'Display Template' or 'Saved Layout'.

Arguments:

Name Type Required Description
elementTypeID ElementTypeID Required The element type ID.
pageID PageID Required The unique ID of the page that the element resides on.
elementID ControlID Required An element's ID.

Context:

License Requirements (none)
Permission Requirements element:Design
Deny Context (none)
Require Context AuthoringEnabled
Author Lock (not required)
Transaction Logging Transaction logging is disabled for this method
Customization This method may be customized at the site level

Error Codes:

None

Notes:

None