Any way to $PARAM use an item from another $PARAM?
#1
In the main menu of my skin has dozens of menus, each menu uses a 'param' from 01 to xx like this:

Code:
<item>
 <include content = "mainmenu_items">
  <param name = "menuitem" value = "01" />
 </include>
</item>

Each menu has its submenu. There are 20 submenus for each menu, like this:

Code:
<item>
 <include content = "submenu_items">
  <param name = "submenuitem" value = "01.1" />
 </include>
</item>

Where 01 refers to the parent menu, and .1 refers to the submenu item (.1 to .20).
It works perfectly, but this way I have to create submenus 01.1 through 01.20 for menu 1, and 02.1 through 02.20 for menu 2, and so on. That's a lot of code.
I would like to be able to make the submenu fish the parent menu item like this:

Code:
<item>
 <include content = "submenu_items">
  <param name = "submenuitem" value ="$PARAM[menuitem].1" />
 </include>
</item>

I know this syntax does not work, I posted only to illustrate what I desire.
Anyway by variables, or even by skin string, property string or another. I've tried it in many ways but none works.
This would save thousands of lines of code because I would only have 20 submenus to suit all menus.

Any idea?
------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
Reply
#2
Can you use a direct call? like this:
Code:

<item>
 <include content = "$PARAM[menuitem].1">
    ....
 </include>
</item>

Assuming that is an include, this seems to work with includes but not inside param's value.
Reply
#3
Thank you for your response but it did not work.
------------------------------------------------------

Want to know more about the skin? Liked my work and want contribute?
Visit my website
XBMC Brazilian Community Forum
By making a donation, please do not post in the forum, send me an email or PM, thank you.
Reply
#4
Hmm... look this is how it's implemented in titan, not sure why this shouldn't work for you as well.

call:
Code:

<include content="widget_base_content_$PARAM[contentStyle]">
    ...
</include>

definition:
Code:

<include name="widget_base_content_normal">
    ...
</include>


Maybe a limitation of the parser and you could try changing pattern so that the submenu 'tag' appears before instead of after the $param and/or using '_' instead of '.'
Reply

Logout Mark Read Team Forum Stats Members Help
Any way to $PARAM use an item from another $PARAM?0