2016-01-15, 00:30
Sure ...
The main idea is that you can pass the $PARAM[Id] like this :
This way you can use the Skinshortcut Id and pass it to different levels with conditions to build scenarios.
You can check my Home.xml and template.xml for passing the ID :
Home
Template
And the cascading here :
Home Viewtype (Most Interresting part starts at line 516)
Note : I mostly use a custom Property passed to param ($PARAM[CompPrefix]) to do that instead of just the Id but it depends the way you want to handle it.
The main idea is that you can pass the $PARAM[Id] like this :
Code:
<!-- include call -->
<include name="level1">
<param name="Id" value="MyWidgetPanelId" />
</include>
<!--include def-->
<include name="level1>
<control type="group">
<!-- include call -->
<include name="level2 condition="MyCondition1">
<param name="Id" value="$PARAM[Id] /> <!-- Pass $PARAM[Id] from level1 to level2 -->
<param name="Var" value="ReplaceMyVarValue1" />
</include>
<!-- include call -->
<include name="level2 condition="MyCondition2">
<param name="Id" value="$PARAM[Id] />
<param name="Var" value="ReplaceMyVarValue2" />
</include>
...
</control>
</include>
This way you can use the Skinshortcut Id and pass it to different levels with conditions to build scenarios.
You can check my Home.xml and template.xml for passing the ID :
Home
Template
And the cascading here :
Home Viewtype (Most Interresting part starts at line 516)
Note : I mostly use a custom Property passed to param ($PARAM[CompPrefix]) to do that instead of just the Id but it depends the way you want to handle it.