Element.cloneLayout (Method)

Clones the specified layout.

Returns:

RenderHandlerID (integer)

Arguments:

Name Type Required Description
originalLayoutType LayoutType Required The type of the layout being cloned.
originalLayoutID ID_NEG1 Required The ID of the layout to clone, or -1 for the Standard layout.
elementTypeID ElementTypeID Required An element's ID.
pageID PageID_0 Required The ID of the Page containing the element layout to be cloned, or 0 if the orginalLayoutType is 'savedLayout'.
elementID ControlID_0 Required The ID of the element instance containing the element layout to be cloned. Ignored if the orginalLayoutType is 'savedLayout'.
name PlainText_NonNull_255 Required The name of the layout.
description PlainText_2000 Optional. Defaults to an empty string. The description for the new layout.
cloneStyle Boolean Optional. Defaults to '1'. A boolean flag which when set to true indicates that the element's style properties should be cloned.
cloneLayoutAndFont Boolean Optional. Defaults to '1'. A boolean flag which when set to true indicates that the element's layout and font properties should be cloned.
cloneMetadata Boolean Optional. Defaults to '0'. A boolean flag which when set to true indicates that the element's render handler metadata should be cloned.
previewImageID ImageID_0 Optional. Defaults to '0'. The ID of the image to use as the preview for the layout. 0 for no image.

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
15023 The specified $1ID is not valid for the specified element.

Notes:

None