Element.deleteLayout (Method)

Deletes the specified layout.

Returns:

Void

Arguments:

Name Type Required Description
elementTypeID ElementTypeID Required ID of an element type.
layoutID ID Required The unique ID of the layout.
ignoreWarnings Boolean Optional. Defaults to '0'. A boolean flag which when set to true indicates that the element layout will be deleted despite any warnings. Warnings will occur if the layout is being used by any elements. If false the layout will not be deleted if any warnings exist.

Context:

License Requirements (none)
Permission Requirements (none)
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
15030 The specified layout is default layout for this element type and cannot be deleted.
15031 The specified layout is in use by one or more elements.

Notes:

None