Enables processing component data source items on branch templates
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 4 commits behind kamsar:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BranchPresets
.gitignore
BranchPresets.sln
README.md
license.txt

README.md

Branch Presets

Ever stored rendering component data source items under a page? For example:

/sitecore/content/Page
/sitecore/content/Page/Datasources/ComponentDataSourceItem

It's a good practice and it seems to work quite well for page specific components.

But have you ever wished branch templates understood that in a logical fashion? What if this:

/sitecore/templates/branches/Foo/$name
/sitecore/templates/branches/Foo/$name/Datasources/ComponentDataSourceItem

...expanded out to have the branch create the hierarchy and re-link the layout details on the instiantiated branch item to point to the right child data source item?

Doing this lets you use branch templates to create preset rendering hierarchies, including page specific data source items.

Sound good? Well you've found the right place to get the code to do just that. This requires Sitecore 8 or above with the pipeline-based item provider to operate.