$PARAM indirection
#1
Hi guys,

I've decided to up my game with my skin and so I have made the jump to using $PARAM includes. It has worked reasonably well up to this point but I have now hit a road block I am having trouble getting my head around, could someone please point out where I am going wrong.

I have the following include definition which is working fine when I pass an $INFO directly to it, but not when I try to pass via a listitem property.
PHP Code:
    <include name="listitem-count">
        <
param name="left" default="0"/>
        <
param name="top" default="0"/>
        <
param name="count"/>
        <
param name="size" default="100"/>
        <
definition>
            <
control type="group">
                <
visible>IntegerGreaterThan($PARAM[count],0)</visible>
                <
animation condition="true" effect="zoom" start="100" end="$PARAM[size]center="auto" time="0">Conditional</animation>
                <
left>$PARAM[left]</left>
                <
top>$PARAM[top]</top>
                <
control type="group">
                    <
descriptionCount (less than 10) </description>
                    <
visible>!IntegerGreaterThan($PARAM[count],9)</visible>
                    <
control type="image">
                        <
left>12</left>
                        <
top>0</top>
                        <
width>32</width>
                        <
height>32</height>
                        <
texture>overlaynumberitems.png</texture>
                    </
control>
                    <
control type="label">
                        <
left>22</left>
                        <
top>4</top>
                        <
width>12</width>
                        <
height>20</height>
                        <
font>font10</font>
                        <
label>$INFO[$PARAM[count]]</label>
                        <
shadowcolor></shadowcolor>
                        <
align>center</align>
                    </
control>
                </
control>

...

            </
control>
        </
definition>
    </include> 

I call it in a number of my views like this and it works fine
PHP Code:
                <include name="listitem-count">
                    <
param name="left" value="170"/>
                    <
param name="top" value="428"/>
                    <
param name="count" value="ListItem.Property(UnwatchedEpisodes)" />
                    <
param name="size" value="90"/>
                </include> 

But when I use the following in a panel container (id=9000)
PHP Code:
                <include name="listitem-count">
                    <
param name="left" value="0"/>
                    <
param name="top" value="138"/>
                    <
param name="count" value="$INFO[Container(9000).Listitem.Property(itemcount)]/>
                    <
param name="size" value="90"/>
                </include> 

and the item for the panel is defined thus, I see nothing (in other words the param is not set correctly)
PHP Code:
                <item><!-- Movies -->
                    <
visible>!Skin.HasSetting(home-movie)</visible>
                    <
thumb>special://skin/extras/homeicons/movie.png</thumb>
                    
<label>$LOCALIZE[31026]</label>
                    <
label2>$LOCALIZE[31026]</label2>
                    <
onclick>$VAR[MovieLibEntry]</onclick>
                    <
property name="itemcount">Window(Home).Property(Movies.UnWatched)</property>
                </
item

I have tried using a $VAR and changing the param and property but currently have had no success, can someone please suggest the correct way to achieve what I'm after?

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#2
Not sure if typo but you use $INFO in the second include.
Reply
#3
(2016-06-09, 13:30)BigNoid Wrote: Not sure if typo but you use $INFO in the second include.
typo, kinda sorta. Basically was trying anything I thought had a remote chance of working, and no the $INFO form above did not work. What I am trying to achieve with the second form is to allow the type of info displayed to be changed based on which particular listitem is shown. So for example show the number of unwatched movies on the movie listitem, show the number of unwatched TVShows on the TVShow listitem, etc. The first form only requires the number of unwatched episodes for each TVShow listitem and so is not required to change the info string. On the other hand my home menu has all manner of icons for various types of media and so requires that I change the home property type displayed for each icon. This is the part I can't figure out.

Any ideas, as I have been starring at this too long and can no longer see the Forrest for the trees.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
Keep trying. I personally dont thunk you can do ... this advanced stuff... using infolabels at all. I myself hit a few walls and went for all scripts instead. Then you can have whatever in your lists, but it will probably only work wih stuff in the database.
Reply
#5
It should just be replaced at the moment that the include is set. There's no info label parsing done.
The container part doesn't work inside containers now I think about it. It shouldn't work even if you use it outside the include.

Edit: and in this case shouldn't be necessary if the container id is the same as the one mentioned in the list item property if i am not mistaken
Reply
#6
Ok. Hmm.. Looking at the xml I believe I have never succeeded in having a $INFO parsed when passed as an attribute. Try moving the value out from the tag and in between brackets. As in: not value="$Info.." but rather <param...>$INFO..</param> ?
Reply

Logout Mark Read Team Forum Stats Members Help
$PARAM indirection0