param with conditional to include
#1
Is it possible to pass a param to an include with a condition="..." applied to it?
Reply
#2
If you mean make the param conditional, not really. However, you can make the include conditional:
Code:
<include content="MyInclude" condition="Window.IsVisible(Home)">
    <param name="MyParam" value="foobar" />
</include>

Just use multiple includes for the different param conditions. Note that include conditions only evaluate on window load, so they won't change dynamically.
For dynamic stuff use variables and/or visible conditions.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Bummer, yeah I was referring to a conditional param.. I have about 10 lines of params that I duplicate a bunch in my settings.. they are mostly position, width, height, stuff like that.. and there are onup, onleft, etc.. The issue was that some of these onleft params had 'condition="..."' applied to them so I was hoping to be able to include that in the param when passing it to the include, but i suppose I'll just continue with duplication
Reply
#4
You can use a param as a condition though.

e.g.
Code:
<include content="MyInclude">
  <param name="onleft" value="9001" />
  <param name="onleft-condition" value="Control.IsVisible(9001)" />
  <param name="onleft2" value="9001" />
  <param name="onleft2-condition" value="Control.IsVisible(9001)" />
</include>
And the include:
Code:
<include name="MyInclude">
  <onleft condition="$PARAM[onleft-condition]">$PARAM[onleft]</onleft>
  <onleft condition="$PARAM[onleft2-condition]">$PARAM[onleft2]</onleft>
</include>

For this specific example, you could also do:
Code:
<onleft condition="Control.IsVisible($PARAM[onleft])">$PARAM[onleft]</onleft>
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
param with conditional to include0