Element.setDefaultLayout (Method)
Sets the specified layout as the default layout for the specified element type.
Returns:
Void
Arguments:
Name | Type | Required | Description |
---|---|---|---|
elementTypeID | ElementTypeID | Required | The type ID of the element that the default is being set for. For example 36 for a Page Index element. |
layoutID | ID_NEG1 | Required | The ID of the layout type which will either be the ID of a render handler, the ID of a display template, or -1 for the Standard Rendering. |
Context:
License Requirements | (none) |
Permission Requirements | site:ManageElements |
Deny Context | (none) |
Require Context | AuthoringEnabled |
Author Lock | (not required) |
Transaction Logging | If transaction logging is enabled at the site level, calls to this method will be logged |
Customization | This method may be customized at the site level |
Error Codes:
Code | Error Message |
---|---|
15024 | The specified layout is inactive. |
15025 | The specified display template is private. |
15026 | The specified layout is not valid for the specified element. |
Notes:
None