Saturday, October 5, 2013

Sitecore How-To: Set the Data Source Property of a Sublayout

The Data Source property of a Sublayout is used when the sublayout needs to use a content item other than the current item.

For example, you may have a landing page with various callouts to other content. These content items would exist in other parts of the tree. For these callout Sublayouts you would not want them accessing the current page item, you would want them pointing at another object that would store the callout title, image and link.

Here are the steps to set the data source on a sublayout on a page.
  1. Login To Sitecore and open the content editor
  2. Navigate to the page you want to edit
  3. Click on Presentation -> Details in the top menu
  4. In the Details Panel click on Edit
  5. Click on Controls to see the list of sublayouts
  6. Click on the Sublayout you want to change the data source for
  7. Click on the data source field. You can either manually enter the path or click browse to choose the content path from the tree dialog
  8. Click ok to save
  9. Click ok to close all the other dialogs

No comments:

Post a Comment