Kentico CMS 7.0 Context Help

Clone object

Clone object

Previous topic Next topic Mail us feedback on this topic!  

Clone object

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

This dialog is displayed when using the clone action to create a copy of an object.


In most cases, you will be asked to enter a display name and code name for the new object. Further settings that determine how exactly the object will be cloned can be accessed by clicking Show advanced settings. This 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 carry over 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.


Specific options


This section offers even more configuration options that must be specified so that the system can correctly create the clone (particularly in the case of complex objects). If you are unsure about the purpose of a setting, try checking the tooltip displayed when hovering over the given field's name.


For example when cloning a Web part, you need to specify the options described below:


Clone web part to category

Selects the category where the new cloned web part will be placed.

Clone web part files

Determines whether copies of the original web part's source files (.ascx and code behind) should also be created in the web project.


You can uncheck this property if the source files are already present in the file system. This may be used when registering an already developed web part as a clone, or if you want the clone to share its source files with the original.

Cloned web part file name

Specifies the name and physical path of the source .ascx file that will be used for the cloned web part.


The path starts from the ~/CMSWebParts/ folder, for example: AbuseReport/AbuseReport.ascx

Copy folder within App_Themes

Indicates if the content of the original web part's theme folder should also be copied for the clone. This folder usually contains files used by the CSS classes defined for the web part.

Clone web part layouts

If enabled, all web part layouts defined for the original will also be copied to the clone.





Cloning web parts on web application installations


If you installed Kentico CMS as a web application project and are cloning a web part with the Clone web part files option enabled, it is additionally necessary to manually include the new source files into the project in Visual Studio.


The same applies for all objects that have physical source files in the web project.


Additional resource can be found in Developer's Guide -> Development -> Object cloning.