Problem using variable in skinning
#1
Hi,  I have a problem with the use of variables

I want to have the fanart of a container
Code:
<include name="HomeTest">
    <param name="visible">true</param>
    <param name="container_id"></param>        
    <definition>
    ...
    
         <texture background="true">INFO[Container($PARAM[container_id]).ListItem.art(fanart)]</texture>

    ...
    </definition>
</include>

I have the id container in a variable FanartTest
Code:
<variable name="FanartTest">        
    <value>5300</value>
</variable>

If i do this, it's doesn't work , i have no fanart
Code:
<include content="HomeKodroid">
    <param name="container_id">$VAR[FanartTest]</param>    
</include>    

But if i do this, it works fine
Code:
<include content="HomeKodroid">
    <param name="container_id">5300</param>    
</include>    
I don't understand the probleme, thanks to help me
Reply
#2
Can't use skin variables as a value like that.

You need to do
Code:

<variable name="FanartTest">
<value>$INFO[Container(5300).ListItem.Art(fanart)]</value>
</variable>

[...]
<control type="image">
<texture>$VAR[FanartTest]</texture>
</control>

$INFO and $VAR evaluate at the same time, so you can't use one as part of the name of the other. To Kodi it looks like you are literally trying to ask for Container("$VAR[FanartTest]")

You can use $PARAM to replace values because $PARAM evaluates at window load with includes, whereas $INFO and $VAR evaluate after the window loads.
Reply
#3
thank you very much , you save my skin :-)
Reply



Logout Mark Read Team Forum Stats Members Help
Problem using variable in skinning0
This forum uses Lukasz Tkacz MyBB addons.