2007-09-25, 23:42
I was wondering if it is possible to do something like the following to conditionally show items in a panel or not?
The example above would only show items in the panel if they had a year value. Is this possible and, if so, how?
Code:
<control type="panel" id="51">
<posx>5</posx>
<posy>140</posy>
<width>450</width>
<height>290</height>
<orientation>vertical</orientation>
<itemlayout height="70" width="220" [b]visible="Skin.String(ListItem.Year)"[/b]>
<control type="image">
<posx>10</posx>
<posy>10</posy>
<width>180</width>
<height>70</height>
<info>ListItem.Icon</info>
<colordiffuse>ddffffff</colordiffuse>
<aspectratio aligny="center">keep</aspectratio>
</control>
</itemlayout>
<focusedlayout height="70" width="220">
<control type="image">
<posx>6</posx>
<posy>2</posy>
<width>200</width>
<height>80</height>
<info>ListItem.Icon</info>
<colordiffuse>eeffffff</colordiffuse>
<aspectratio aligny="center">keep</aspectratio>
</control>
</focusedlayout>
</control>
The example above would only show items in the panel if they had a year value. Is this possible and, if so, how?