Templates Location Rules

Added in SCORE 2.1

Description

Templates Location rules are used in getRenderingDatasource pipeline to support the "Select a Datasource" dialog used to configure the data source of a presentation component. With that rule tenant could override datasource template used in Rendering.  

 

<pipelines>
....
<getRenderingDatasource>
  ...  
  <processor  type="Score.Custom.Pipelines.Editor.AddDerivedTemplatesForSelection, Score.Custom">
    <templates hint="list:AddTemplateId">
      <template>{BFAFEBB6-319B-42E6-A9AD-0F58F2F4B96F}</template> <!-- /sitecore/templates/Score/Base/Snippet -->
    </templates>
 </processor>
</getRenderingDatasource>
....
</pipelines>





 

AddDerivedTemplatesForSelection processor executes rules under "/sitecore/system/Settings/Rules/Templates Location" folder.

Rule Definitions

Templates Location rule definitions is under "/sitecore/system/Settings/Rules/Definitions/Elements/Templates Location" folder.

Custom Conditions

No custom conditions are defined for rule

Custom Actions

Templates Location has 1 actions:

Rule Scaffolding

Provides "Select a Datasource" dialog with extended templates resolving functionality. New Item will be created based on template from selected folder if template inherits from one defined Rendering's data Source field.

Solves create Snippet issue by substituting generic Snippet template with tenant specific one.