Solved "IsEmpty" not working with variable?
#1
I'm having an issue using a variable to control the visibility of my fanarts. It doesn't seem to work at all although the content of the variable seems correct. Maybe the problem is in the IsEmpty function?

What I didd first is creating a variable called MetaFanart (which at the moment only contains the standard fanart of the currently selected element):

xml:
<variable name="MetaFanart">
    <value condition="!String.IsEmpty(ListItem.Art(fanart))">$INFO[ListItem.Art(fanart)]</value>
    <value></value>
</variable>

Then, in the background of my layout I show a text label with the content of the variable as a check that everything works as it should (and it does).

xml:
<control type="label">
    <label>$VAR[MetaFanart]</label>
    <visible>true</visible>
</control>

So, the next step is to show the actual fanart but make it visible only when it exists, so...

xml:
<control type="image">
    <description>Fanart Image</description>
    <include>BackgroundDimensions</include>
    <texture>$VAR[MetaFanart]</texture>
    <visible>!String.IsEmpty($VAR[MetaFanart])</visible>
    <!--<visible>true</visible>-->
</control>

...and there is the proble, it doesn't work!? If I set the visible tag to true, it works with no problem. Is there any bug in the "String.IsEmpty" function or should I use something different for variables?

Regards and thanks in advance
Reply


Messages In This Thread
"IsEmpty" not working with variable? - by PixelGordo - 2019-09-06, 10:14
Logout Mark Read Team Forum Stats Members Help
"IsEmpty" not working with variable?0