14 December 2010

Insert Options – Individual Items, Standard Values or Rules

A very common question I receive is that people don’t know anymore where to setup Insert Options. Especially with the new possibilities of the Sitecore 6.1 content management system.

Here’s my view on this:

  1. Individual item
    Rarely, you want to setup Insert Options on individual items. Something when you have a specific folder or section in your website, you might chose for this option. Keep in mind that this you always should have a valid reason.
    For example: For all my meta data I use the /Common/Folder template to store my item underneath. As these folders have only 1 specific setting(Insert Options), I’ve decided not to Subtemplate(create a new template and inherit from the Folder-template) the Folder-template, because of maintainability. Consider in that case Insert Option Rules.
  2. Branch Templates
    It’s a bad practice to set any Insert Options on Branch templates.
  3. Standard Values
    95% of the cases setup your Insert Options on Standard Values as it’s applied everywhere when you use the specific template.
  4. Insert Options Rules
    When you need to setup global conditions, like ‘All the items based on the Folder template containing the word ‘Blog’ should add the Blog Entry template as Insert Option’.
    We use it ourselves in the Marketing Center. We allow everybody to create folders, but we want them to create specific items underneath.
    Before setting up a rule, figure out if you can’t do it with Standard Values.

Trimming the list afterwards can always be done by settings up Insert Rules.
For an advanced Reference regarding these Content Infrastructure topics, please refer to Data Definition Reference.

1 comment:

  1. Hey Alex:

    Very good post; I had a different but closely related question I’m curious for your opinion.

    When assigning a layout and sublayouts to a given data template, there are a few options:

    1. Individual items
    - There are serious maintainability issues with this option, as content authors would be required to select all of the layout details for individual content items, so I’d say this is a ‘bad practice’.

    2. Data template
    - Assigning the default layout and sublayouts on the data template allows individual items to inherit settings from the data template.
    - One downside of this option is that if a content author needs to change the layout/sublayouts on an individual item, they need to “break” the inheritance, resetting the layout details defined at the data template level (though the ‘Copy To’ functionality on the Layout Details can make this easier).

    3. Data template standard values
    - Assigning the default layout/sublayouts on the data template’s standard values allows invidual items to inherit settings from the data template, but will automatically “break” the inheritance.
    - This option has the benefit of already setting all of the layout details on individual items. On the other hand, this option could cause some maintainability issues because _all_ items will “break” inheritance from the parent template. One example is that it would be difficult to remove a sublayout from all items of a given data template type in this scenario.

    So, what do you think? Is option 2 a ’95%’ best practice, where option 3 should be used for data templates that will most likely need to be reconfigured for each individual item?