2015-11-28, 13:40
I'm trying to figure a way (or a way around) to pass a parameter back to a variable.
Simplification of what I am trying to do:
I have a label control in a container template:
So the include this is part of is reused several times and the container differs every time.
However, the above doesn't suffice. The label needs to have different info depending on a property set elsewhere.
So what I would like to do is:
and get the value from the variable as in this example:
ID 9000 is a different container from the one that needs to display the info.
But this will not work. Probably because the variable is not "aware" of the parameters set.
Any ideas anyone? Hopefully the above is somewhat clearly explained.
Simplification of what I am trying to do:
I have a label control in a container template:
PHP Code:
<param name="ID"/>
...
<definition>
<label>$INFO[Container($PARAM[ID]).ListItem(0).Label]</label>
</definition>
So the include this is part of is reused several times and the container differs every time.
However, the above doesn't suffice. The label needs to have different info depending on a property set elsewhere.
So what I would like to do is:
PHP Code:
<label>$VAR[InfoLabel]</label>
and get the value from the variable as in this example:
PHP Code:
<variable name="InfoLabel">
<value condition="StringCompare(Container(9000).ListItem.Property(widget),movies">$INFO[Container($PARAM[ID]).ListItem(0).Title]</value>
<value condition="StringCompare(Container(9000).ListItem.Property(widget),music">$INFO[Container($PARAM[ID]).ListItem(0).Artist]</value>
..
ID 9000 is a different container from the one that needs to display the info.
But this will not work. Probably because the variable is not "aware" of the parameters set.
Any ideas anyone? Hopefully the above is somewhat clearly explained.