Kodi Community Forum

Full Version: Static List Content problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to do a static content list, but I have a problem, the icon and the label don't appear. on the image, shows the fallback image. What I'm doing wrong?
PHP Code:
<control type="list" id="9501">
                    <
visible allowhiddenfocus="true">!IsEmpty(Window.Property(content)) + String.IsEqual(Window.Property(content),2) + !Container(9501).IsUpdating + !Control.IsVisible(50)</visible>
        <include>
Animation.DelayFadeIn.Slide</include>
        <
ondown>ClearProperty(content)</ondown>
                    <
ondown>9000</ondown>
                    <
onback>ClearProperty(content)</onback>
                    <
onback>9000</onback>
                    <
onleft>9501</onleft>
                    <
onright>9501</onright>
                    <
bottom>80</bottom>
                    <
left>530</left>
                    <
width>1320</width>
                    <
height>670</height>
                    <include>
Animation.FadeIn.Slide</include>
                    <
ondown>ClearProperty(content)</ondown>
                    <
ondown>9000</ondown>
                    <
orientation>horizontal</orientation>
                    <
preloaditems>2</preloaditems>
                    <
scrolltime tween="quadratic">400</scrolltime>
                    <
itemlayout height="455" width="660">
                        <
control type="image">
            <
left>0</left>
            <
top>0</top>
            <
right>0</right>
            <
bottom>130</bottom>
            <
texture border="10">common/nofocus-shadow10.png</texture>
        </
control>

        <
control type="image">
            <
left>10</left>
            <
top>10</top>
            <
right>10</right>
            <
bottom>140</bottom>
            <
aspectratio scalediffuse="false">scale</aspectratio>
            <
texture diffuse="diffuse/wall.png" background="true" fallback="DefaultPicture.png">$INFO[ListItem.Icon]</texture>
        </
control>

        <
control type="image">
            <
left>10</left>
            <
right>10</right>
            <
bottom>10</bottom>
            <
height>106</height>
            <
texture colordiffuse="Dark4" border="5">common/box.png</texture>
        </
control>
        <
control type="textbox">
            <
left>20</left>
            <
right>20</right>
            <
centerbottom>60</centerbottom>
            <
height>92</height>
            <
font>Mini</font>
            <
autoscroll>false</autoscroll>
            <
textcolor>Dark2</textcolor>
            <
label>$INFO[ListItem.Label]</label>
            <
aligny>top</aligny>
            <
align>center</align>
        </
control>
    </
itemlayout>
    <
focusedlayout height="455" width="660">
    <
control type="image">
            <
left>0</left>
            <
top>0</top>
            <
right>0</right>
            <
bottom>130</bottom>
            <
texture border="10">common/nofocus-shadow10.png</texture>
        </
control>
        <
control type="image">
            <
left>10</left>
            <
top>10</top>
            <
right>10</right>
            <
bottom>140</bottom>
            <
aspectratio scalediffuse="false">scale</aspectratio>
            <
texture diffuse="diffuse/wall.png" background="true" fallback="DefaultPicture.png">$INFO[ListItem.Icon]</texture>
        </
control>
        <
control type="group">
            <
control type="image">
                <
left>10</left>
                <
right>10</right>
                <
bottom>10</bottom>
                <
height>106</height>
                <
texture colordiffuse="$VAR[ColorHighlight]border="5">common/box.png</texture>
            </
control>
            <
control type="textbox">
                <
left>20</left>
                <
right>20</right>
                <
centerbottom>62</centerbottom>
                <
height>92</height>
                <
font>Mini</font>
                <
scroll>true</scroll>
                <
textcolor>PanelWhite100</textcolor>
                <
label>$INFO[ListItem.Label]</label>
                <
aligny>top</aligny>
                <
align>center</align>
            </
control>
        </
control>
                    </
focusedlayout>
                    <
content>
                    <
item id="1">
                    <
icon>$INFO[ListItem.Art(map)]</icon>
                    <
label>My First Item</label>
                     <
visible>true</visible>
                     </
item>
                     <
item id="2">
                    <
icon>$INFO[ListItem.Art(boxfront)]</icon>
                    <
label>My Second Item</label>
                     <
visible>true</visible>
                     </
item>
                    </
content>
                </
control

Thanks in advance
Best regards
you need to add <onclick></onclick> to each item.
(2017-02-14, 01:18)ronie Wrote: [ -> ]you need to add <onclick></onclick> to each item.
Well, I never would have guessed because I didn't want to do anything on onclick. but it makes sense that it needs to be defined. so I added <onclick>9501</onclick>

thanks for the help