Kodi Community Forum
[REQUEST] <constant> tag allows not only numerically values - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: [REQUEST] <constant> tag allows not only numerically values (/showthread.php?tid=56007)



[REQUEST] <constant> tag allows not only numerically values - eumel - 2009-08-07

the problem is:

I would like to use wraplist and fixedlist in the tv shows on different conditions.
That it would be good if <constant> not only numerical values would support.

example:
Code:
<include name="MultiplexFixedList">
   <constant name="MultiplexListType">fixedlist</constant>
</include>
<include name="MultiplexWrapList">
   <constant name="MultiplexListType">wraplist</constant>
</include>

<include condition="Skin.HasSetting(SeasonsFixedList)">MultiplexFixedList</include>
<include condition="Skin.HasSetting(!SeasonsFixedList)">MultiplexWrapList</include>
<control type="MultiplexListType" id="52">
   ...
</control>
or better with conditional function in <constant> tag:
example:
Code:
<constant name="MultiplexListType" condition="Skin.HasSetting(SeasonsFixedList)">fixedlist</constant>
<constant name="MultiplexListType" condition="Skin.HasSetting(!SeasonsFixedList)">wraplist</constant>

<control type="MultiplexListType" id="52">
   ...
</control>
so you do not have to write multiple lists with the same id


- jmarshall - 2009-08-08

If it is conditional it isn't a constant.

There's a ticket on trac for skin variables. This is the exact same idea.

It's awaiting someone to provide a patch.

Cheers,
Jonathan