Sunday, October 17, 2010

Sitecore 6.4 Cloning – What does it Mean?

If you want to know “what it is”, then check John West’s Blog.  John gives you a quick preview of this new powerful feature, what it does, how it compares with other Sitecore assets, etc.  The concept is not far-fetch and you may have already required or implemented it before.  It essentially allows an item to use another item’s field values.  Let’s say you have a Location page (content item) that has days/hours of operation, amenities, location name, map, address, etc.  Also, let’s say that all locations have the same hours of operation and amenities.  What cloning allows you to do is to “clone” the location content item for another location and just update the address, name, and map.  Upon rendering, you’ll see a complete page with the re-used (or shared depending on how you look at it) content values of hours of operations and amenities together with the specific values for address, name, and map.  This is all without developing any logic specific to this except for rendering the fields.  Cool, huh?

The reality is that this concept is not something new in Sitecore (except for the name).  In a way, it is an extension of the Standard Values that allows us to put default values in templates.  When you create a content item, the item automatically gets default values from Standard Values.  You can actually see [standard value] by the field title to tell you that it came from there.  This is similar to a Clone where [original value] appears by the title field.   When a content item’s field is updated the [standard value] disappears, the same way with a clone.   So if you think about it, this is how Sitecore looks for content for an item: Clone Field Values >> Cloned Item Field Values >> Template Standard Values. 
Is this really beneficial?  If you think putting default values in data templates is valuable, then it is.  I do think it allows us to have more options on how content is shared among content items especially for Sitecore instances where there are multiple similar Websites.  Let’s say that you own several franchises and you wish to pre-define service pages.  However, you do want to have your franchises to overwrite service descriptions if needed.  Cloning service pages from the main site is one way of doing so. Just so you know, since this is a core Sitecore feature, the next version of Sitecore Foundry definitely benefits from this.
Of course I do have some questions on this new great feature:
  • What API changes are we to expect? 
  • Can I create a clone of an item? 
  • If I delete a cloned item, what happens?  When “un-cloning”, does it create a new version and can I revert back to a cloned version? 
  • If I clone a published version, is my clone published?  Maybe not since clones do not inherit Workflow state, but the publish state is not really part of workflow…
  • Can I revert a field back to the cloned item’s field value (maybe even programmatically)?
  • Are Sitecore Dictionary and Tokens affected? (read more about tokens in my previous post).
  • Can you clone a specific version of a content item? Language? How about of a clone?
  • Can cloning be secured? User-specific access?
These are just some questions I’ll be answering in a future post. The technical preview of Sitecore v6.4 is going to be available on Oct. 18 in SDN, so I’ll grab it and see if I can get my answers then. If you do get to play with it earlier than I do and know the answers, please post a comment and let us know.

5 comments:

  1. So happy to be given a privilege to post a comment here.

    www.joeydavila.net

    ReplyDelete

  2. I have found your blogs to be friendly and welcoming. Thanks for making this one. I really enjoy reading and surfing it. Try to visit my site @ www.imarksweb.org

    Zack

    ReplyDelete
  3. It's a great pleasure to read your blog. Keep on sharing some kind of knowledge. Have a good day :)

    gofastek.com

    ReplyDelete
  4. Good post. I learn something more challenging on completely different blogs everyday. It will always be stimulating to read content from other writers and practice just a little something from their store. I’d choose to use some with the content on my weblog whether or not you don’t mind. Natually I’ll offer you a link on your internet blog. Thanks for sharing. casino slots

    ReplyDelete