17

I've seen two schools of thought on structuring the content tree as it relates to datasource items:

  • Store datasource items in a folder underneath the context item
  • Store data source items in a folder outside of the items representing pags ("global" folder, "metadata" folder, etc.)

What are the advantages/disadvantages to these approaches? The Habitat implementation of Helix seems to favor the second.

2
  • 3
    Habitat does both. There's a "Global" folder for content shared across the site and there are many "Local Content" folders under content items for item-specific content. Commented Oct 4, 2016 at 20:15
  • 2
    FYI A while back I wrote a blog post summarising some the of the opinions related to this topic: sitecoreskills.blogspot.co.uk/2016/05/… Commented Oct 4, 2016 at 22:02

3 Answers 3

19

In my opinion, these are the scopes you need to consider:

  1. Global (across multiple sites)
  2. Site (across an entire site)
  3. Pillar/Section (used across an entire subtree of a site)
  4. Page (Used only on this page)

Using only one location does not allow you to scope your security appropriately for your authors. If you have a single global folder, that means giving authors from all sites and pages access to a single repository where they can potentially edit content from other sites. This is a big issue with multi-tenant and multi-site (though in some cases is actually helpful for shared content across sites).

The page-specific content allows your authors to maintain their own little 'bucket' of scope that other users can't select for re-use. Some content governance folks might not like the idea of private content, but I haven't met an author yet who didn't have the "but this is special just for me" need.

Section/pillar scope is useful when working with large sites that tend to divide their IA by department, business, or brand. You will often have different teams managing these sub-trees and often different roles and permissions. Their shared content is not the same as the site-wide header that might be in use across the whole site.

If you can provide those 4 levels of datasource scopes, you should be able to cover most scenarios for content management governance.

2
  • 1
    This. Security is a major factor, having a localised content folder allows the folder to inherit the same permissions as the parent.
    – jammykam
    Commented Oct 4, 2016 at 21:21
  • Great answer! Adding onto @jammykam's comment, I usually use the page's datasource warehouse for the page and descendants, to keep things trimmed. Commented Oct 4, 2016 at 23:10
5

In the past I would have advocated for using a single place to store blocks of content used as data sources. It makes administration easier including things like access rights and it keeps the "page tree" clean.

Today I think a little differently. Since Sitecore 7 and the introduction of the new Content Search and bucket folders, I'm often inclined to facilitate searching for data source items using template filters rather than specifying the exact location. This is very useful for image fields as well.

If one does prefer a more static tree structure, I would go for a mixed approach ranging from global items, site specific items etc to page specific items as defined above.

For a number of varieties, check out John West's monumental seven part blogpost starting here: https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/sitecore-7-data-sources-part-1-enhancements

3

Pros and cons of both

Interesting article the other day where can use both. http://sitecorecode.com/index.php/2016/09/19/how-to-give-multiple-datasource-locations-to-single-sublayout-or-rendering-in-sitecore/

If under each item then clear what it belongs too, no surprises when update it and only affects that page.

If in a repository then promotes idea of sharing/reuse. But should be aware if modify an existing one, that will alter on the other pages using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.