Visibility for Listitem.Studio
#1
Hi all, i want to display an alternative label for ListItem.Studio if the label is not found, then show a fallback image "Default.png".
My test code:

PHP Code:
                    <control type="image" id="1000">
                        <
width>96</width>
                        <
height>64</height>
                        <
aspectratio align="center">keep</aspectratio>
                        <
texture fallback="flags/studios/Default.png">$INFO[Listitem.Studio,flags/studios/,.png]</texture>
                    </
control>
                    <
control type="label">
                        <
width>200</width>
                        <
height>64</height>
                        <
align>left</align>
                        <
label>$INFO[ListItem.Studio]</label>
                        <
font>condensed_20-U</font>
                        <
textcolor>Color9</textcolor>
                        <
wrapmultiline>true</wrapmultiline>
                        <
visible>Control.GetLabel(1000) + SubString(Control(1000),Default.png)</visible>
                    </
control

Obviously, my code is wrong, no label for ListItem.Studio is displayed. Only the fallback image.
Can someone helps me? Thanks.
Reply
#2
Like you have done with the texture fallback you can provide a label fallback in the <label> tag, e.g.

<label fallback="unknown studio">$INFO[ListItem.Studio]</label>
 
Reply
#3
Thank you Eddage, surely I have not explained well.
My goal is to show the label for ListItem.Studio if the corresponding icon in flags/studios is not found.
Reply
#4
Shouldn't that be -

PHP Code:
<visible>SubString(Control.GetLabel(1000),Default.png)</visible
Reply
#5
Yes, Master Hitcher, it works perfectly.
I did not think of combining toghether control.getLabel and substring
Thank you very much.
Reply

Logout Mark Read Team Forum Stats Members Help
Visibility for Listitem.Studio0