Rendering Transformation Rules
Description
Rendering Transformation Rules are used in executePageEditorAction and mvc.customizeRendering pipelines to manage transformations between compatible renderings.
compiled web.config
<pipelines> ... <executePageEditorAction> ... <processor patch:before="processor[@type='Sitecore.Pipelines.ExecutePageEditorAction.StopIfSublayout, Sitecore.Kernel']" type="Score.Custom.Pipelines.Analytics.RunReplaceRenderingRules, Score.Custom"/> ... </executePageEditorAction> ... <mvc.customizeRendering> ... <processor patch:after="*[last()]" type="Score.Custom.Pipelines.Analytics.RunReplaceRenderingRules, Score.Custom"/> ... </mvc.customizeRendering> </pipelines>
RunReplaceRenderingRules processor executes rules under "/sitecore/system/Settings/Rules/Rendering Transformations/Rules" folder.
Rule Definitions
Rendering Transformation Rules definitions are under "/sitecore/system/Settings/Rules/Definitions/Elements/Rendering Transformations" folder.
Custom Conditions
Rendering Transformation has only one condition:
- Replacing Specific Rendering Condition - the condition evaluates to true if source and target renderings are of specified types (specified as FromRendering for source, and as ToRendering for target rendering).
Custom Actions
Rendering Compatibility has 2 actions:
- Replace Direct Descendent Rendering - the action moves direct descendants of source rendering (specified as FromRendering) into target rendering (specified as ToRendering)
Replace Dynamic Key Value - the action moves renderings contained in source placeholder (specified as FromKey) to target placeholder (specified as ToKey)