Monday, January 7, 2008

Defining Taxonomies and Look-Ups

Every Sitecore implementation will require content branches that define content taxonomies and/or look-up values. Often, these branches will be placed in a Global folder at the same level as your Home item. Within the Global folder, your metadata values can be organized based on existing taxonomies or structured to facilitate the use of look-up controls (i.e. lookup, multilist, tree, etc.). For example:

I. Home
  a. Products
  b. About Us
II. Global
  a. Market Segments
    i. Age
      1. 18-25
      2. 26-30
    ii. Frequency
      1. This month
      2. Past 6 months
  b. Taxonomy
    i. …

Why put the Global folder at the same level as your Home item? The idea here is that end users (i.e. public visitors to your website) will never navigate to the Global items. The items in the Global folder will typically not have presentation settings and will sometimes be based on very simple templates. The values in the Global folder can be accessed within the UI (for example, as a data source for a lookup control) or within your presentation logic.
This approach works for many scenarios where developers need to create a data source for lookup fields. Sometimes, however, you may want users to navigate to content items that also serve as metadata sources. Consider the following:

I. Home
  a. Products
    i. Summer 2007
      1. Product A
    ii. Fall 2007
  b. …
II. Global
  a. Market Segments
    i. Age
      1. …

A content item based on the Product template may have an Age Segment field and a Season field. The source for the Age Segment field could be /sitecore/content/Global/Market Segments/Age while the source for the Season field could be /sitecore/content/Home/Products. The product seasons are both content items that an end-user can navigate to as well as a data source for the Season field within a Product item.

No comments: