Kentico CMS 7.0 Developer's Guide

Overview

Overview

Previous topic Next topic Mail us feedback on this topic!  

Overview

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Cloning provides an easy way to create an exact copy of an object. It is supported for all objects throughout the system, from the most basic records to complex data structures such as document types or user accounts. If you wish to reuse any part of an existing item or create a modified version of it, cloning is much more efficient than adding a new object of the given type and manually carrying over the values and various configuration options from the original.

 

To clone an object, find it on the listing page in the appropriate section of the administration interface, click the OtherActions Other actions button next to it and select the Clone Clone option in the drop-down menu.

 

devguide_clip2007

 

Objects that are displayed in a tree menu instead of a standard list may be cloned via a button available in the panel above the tree.

 

Using the clone action opens a dialog where you can specify exactly how the cloned object should be created. In most cases, you will be asked to enter a display name and code name for the new object. Further settings can be accessed by clicking Show advanced settings, which offers the following options:

 

Delete clone on failure - if enabled, the new object will be removed if an error occurs during any part of the cloning process.

Keep fields localized - if checked, the cloned object will transfer all localization macros (i.e. resource strings) placed inside its fields. Otherwise they will be replaced by the values entered for the default culture. This does not affect the Display name field, which is filled in manually using the New object display name field.

 

Additional settings depend on the type of the cloned object. They typically allow you to choose what types of associated data should be cloned along with the given object, such as for example child objects, attachments, bindings to other objects etc.

 

devguide_clip2008

 

Many objects also offer even more configuration options in the specific options section. These must be specified so that the system can correctly create the clone (particularly in the case of complex objects). Information about individual settings can be found in the tooltip displayed when hovering over the names of fields.