In Sitecore, a clone is an item that is not just a copy of the original item, but one that inherits the field values from the original item. If you update a field in the original item, the corresponding field in the clone is also updated.
What Can Be Cloned?
Here are the following items which can be considered for cloning:
- Complete site
- Section of site
- Individual Item
How To Clone An Item?
1st Method
Select the item and go to the Home tab. Click on the arrow of the Duplicate button. Over there you will get the option to clone the item.
2nd Method
In the content tree, select the item that you want to clone . On the Configure tab , in the Clones group, click clone.
While you clone the item, you will get a prompt to choose the destination of the cloned item. After choosing the destination, cloning will be done with the exact values of the original item.
If you select the clone item in the Content Editor, you notice that the field titles have the [original value] text added. This means that these values match the corresponding values in the original item and are updated if you edit the field in the original item.
Now if you change the value in the original item, the corresponding value in the cloned item will be changed. This will pass on to all cloned items in the content tree. Even if you clone from a cloned item, the value change in one place will take place in all subsequent cloned items.
If you change the version of the original item, the value will not be placed in the cloned item automatically. You will get an option to clone the next version of the original item. And then it will be changed.
Note - If you clone an item that is in a workflow, the workflow and the Workflow state properties are copied to the clone item. After the workflow fields are copied, the workflow properties of the clone and the workflow properties of the original items are not connected any more. If you change the workflow state of the original item, the workflow state of the clone does not change.
Breaking The Inheritance For A Cloned Item
we can break the inheritance on field level, to break inheritance on the field level, just go to the clone item and update any specific field value. Once we update a specific field value manually for any clone item, that field won’t share/inherit the value from the parent/original item. This is helpful in cases where certain field values to be shared from the parent item, and certain field values managed separately in the clone item.
In the above screen shot we can see that Text doesn’t show any original value text because the value was updated directly in the cloned item, but Title still inherits it from the parent item.
How To Get The Cloned Items In The Content Tree?
There is a way by which you will get to know the cloned item by just expanding the Content tree. Open the content tree and right-click on the blank space on the left side of the Content tree options.
An option list will come up and from there choose Cloned Items.
After this, an icon will be shown beside the item on that blank space. On clicking the icon, the original item will be selected in the content tree.
How Cloned Item Tracks Changes In A Source Item?
Now the question is how changes from the source item get reflected in cloned items. We need to check standard fields for this. In each item’s standard field, there is Source field in Advanced section. This field stores reference to the source item from which item is cloned.
Note - If the Advanced section is not visible, click the View tab and select the Standard fields check box.
What Does It Mean To Unclone?
Once the item is cloned, you will get an option to Unclone it, over there in the Home and configure tab. If you no longer want to have a connection between the original item and the clone, you can unclone the clone item.
How To Unclone A Cloned Item?
Select the clone item you want to unclone. On the Configure tab, in the Clones group, click Unclone.
No field values in the clone item change. The connection between the clone and the original item is removed and the clone becomes a normal content item.