PDA

View Full Version : Can you use <visible> based upon whether there is data in a tag.


MacGyver
2007-01-27, 16:02
Ok here is why.

In music view, a folder has no tag info, but an mp3 does.
I want to give conditional visibility based upon whether the focused object has info in its tag ie. a folder will not have any tag info, therefore I don't want to show a box with year,duration,genre,track in it for a folder. I have tried the following:

<visible>!ListItem.Artist</visible>

<visible>!Skin.String($INFO[ListItem.Artist])</visible>

<visible>!Skin.String(ListItem.Artist)</visible>

like so

<control type="label" id="1">
<description>Year txt</description>
<posx>75</posx>
<posy>409</posy>
<width>130</width>
<label>Year: $INFO[ListItem.Year]</label>
<align>center</align>
<font>font13</font>
<textcolor>FFFFFFFF</textcolor>
<visible>Control.IsVisible(54) + !Skin.String(ListItem.Year)</visible>
</control>

Did not work.


It looks ok if it's displaying mp3s.
http://a481.ac-images.myspacecdn.com/images01/6/l_ebd25901a8fcdf4f4b27da9910c25bc8.jpg

but with folders, not so much.

http://a453.ac-images.myspacecdn.com/images01/5/l_fd7597db07cd353b5fa83ac4230d9f84.jpg
Any ideas on how to do this?

Jezz_X
2007-01-27, 19:42
I don't think its possible

Jezz_X
2007-01-27, 20:00
AT this point I would liek to point out that you can do it simply another way for the text by doing it like this
<label>$INFO[ListItem.Genre,$LOCALIZE[174] ]</label>
$LOCALIZE[174] is just the text "Genre" but because its in the $INFO[] bit it only gets displayed if the info has a value.
It works like this
$INFO[Value you want,Before text,Aftertext]