2015-09-30, 14:15
Hi,
Wanting to reuse a menu-layout, but with different items. And thought using $PARAM was the clever way to do it.
My goal is to determine if two predefined constant text strings are equal
My skin XML is like this:
In each xml where I want my sidemenu:
And in the <includes>:
.. but the Stringcompare part never becomes true.
The Layout and include condition workes nicely for other conditions; eg. Window.isactive(videolibrary). The parameter "subMenu" is passed nicely and shows fine in a label.
I do notice that the string functions mentioned on the wiki on bools says "info" as the first parameter. So perhaps another function that actually compares strings is what I need?
Why I suddenly needed more control than window.isactive is because of the settings windows. There are many, and I donøt want to check for lots of windows when I can simply choose what to display using a $PARAM. Should be a faster run that way?
Thanks,
p.s. I wish I could hilite code inside the <pre> tag for even faster readability.
Wanting to reuse a menu-layout, but with different items. And thought using $PARAM was the clever way to do it.
My goal is to determine if two predefined constant text strings are equal
My skin XML is like this:
In each xml where I want my sidemenu:
Code:
<include name="menuItems">
<param name="subMenu">settings</param>
</include>
And in the <includes>:
Code:
<include name="menuItems">
<param name="subMenu" default="X"/>
<definition>
... (layout stuff)..
<include condition="Stringcompare($PARAM[subMenu],settings)">itemsForSettings</include>
...(layout stuff somemore)
.. but the Stringcompare part never becomes true.
The Layout and include condition workes nicely for other conditions; eg. Window.isactive(videolibrary). The parameter "subMenu" is passed nicely and shows fine in a label.
I do notice that the string functions mentioned on the wiki on bools says "info" as the first parameter. So perhaps another function that actually compares strings is what I need?
Why I suddenly needed more control than window.isactive is because of the settings windows. There are many, and I donøt want to check for lots of windows when I can simply choose what to display using a $PARAM. Should be a faster run that way?
Thanks,
p.s. I wish I could hilite code inside the <pre> tag for even faster readability.