How do these work [listitem.Label] & [listitem.Label2]
#1
Hi just a quick question how does the following work?

Code:
<label>$INFO[listitem.Label]</label>
<label>$INFO[listitem.Label2]</label>

In my quest of learning and to get the skin I want I've been playing around with a list to display a list of albums that I have on my server, whilst looking around at various lists I came across the above and decided to tested it.

Code:
                <itemlayout height="60" width="580">
                    <description>The Menu</description>
                    <control type="image">
                        <description>The Orange Line</description>
                        <posx>0</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label2]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                </itemlayout>
                <focusedlayout height="60" width="580">
                    <control type="image">
                        <posx>0</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label2]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>                
                </focusedlayout>

When I first enter the music menu I get the list of albums on the right like I want, it shows the Album title and underneath it shows the artist (As expected).

When I drill into an album I now get the track listing as expected but this time I get a Album - Title - Artist and underneath it I get the duration (Ideally I would like Song title on top line and duration under it).

Is this something to do with the Label and Label2 tags or is it something to do with confluence as I'm using that as a base to learn from and build my skin?

I looked on the wiki and it explained it as:
Listitem.Label Shows the left label of the currently selected item in a list or thumb control
ListItem.Label2 Shows the right label of the currently selected item in a list or thumb control


Now I've been learning lots but this one confused me lol, can someone dumb it down for a newbie please.

Thanks in advance.
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#2
(2012-10-13, 16:44)Icerat Wrote: Hi just a quick question how does the following work?

Code:
<label>$INFO[listitem.Label]</label>
<label>$INFO[listitem.Label2]</label>

In my quest of learning and to get the skin I want I've been playing around with a list to display a list of albums that I have on my server, whilst looking around at various lists I came across the above and decided to tested it.

Code:
                <itemlayout height="60" width="580">
                    <description>The Menu</description>
                    <control type="image">
                        <description>The Orange Line</description>
                        <posx>0</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>white</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label2]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>grey</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                </itemlayout>
                <focusedlayout height="60" width="580">
                    <control type="image">
                        <posx>0</posx>
                        <posy>0</posy>
                        <width>580</width>
                        <height>1</height>
                        <aligny>bottom</aligny>
                        <texture>RightListDiv.png</texture>
                    </control>
                    <control type="label">
                        <description>Title</description>
                        <posx>30r</posx>
                        <posy>-10</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom30</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <posx>30r</posx>
                        <posy>15</posy>
                        <width>500</width>
                        <height>50</height>
                        <label>$INFO[listitem.Label2]</label>
                        <align>right</align>
                        <aligny>center</aligny>
                        <font>prom18</font>
                        <textcolor>orange</textcolor>
                        <shadowcolor>black</shadowcolor>
                    </control>                
                </focusedlayout>

When I first enter the music menu I get the list of albums on the right like I want, it shows the Album title and underneath it shows the artist (As expected).

When I drill into an album I now get the track listing as expected but this time I get a Album - Title - Artist and underneath it I get the duration (Ideally I would like Song title on top line and duration under it).

Is this something to do with the Label and Label2 tags or is it something to do with confluence as I'm using that as a base to learn from and build my skin?

I looked on the wiki and it explained it as:
Listitem.Label Shows the left label of the currently selected item in a list or thumb control
ListItem.Label2 Shows the right label of the currently selected item in a list or thumb control


Now I've been learning lots but this one confused me lol, can someone dumb it down for a newbie please.

Thanks in advance.

you should use listitem.title, listitem.album etc if you want to have it more specific. label2 can change its content based on sort criteria.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Ah ok is that where it gets it's values from then.

Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#4
Since I'm playing with this again Ive learnt a lot but cant figure something out, and its kinda related to this.

I have my list to display my albums and they display fine but the issue I'm having is this.

At the top of the list above the first album name where it usually displays "..." is blank, if i use label instead of title or album it displays the "..."

How do i get the ".." back?

Code:
            <control type="list" id="506">
                <description>The List</description>
                <left>77</left>
                <top>65</top>
                <width>295</width>
                <height>572</height>
                <onleft>2</onleft>
                <onright>60</onright>
                <onup>506</onup>
                <ondown>506</ondown>
                <viewtype label="31983">list</viewtype>
                <pagecontrol>60</pagecontrol>
                <scrolltime>200</scrolltime>
                <visible>Window.IsVisible(MusicFiles) | Window.IsVisible(MusicPlaylist) |  Container.Content(Songs) | Container.Content(Albums)</visible>
                <itemlayout height="52" width="270">
                    <control type="label">
                        <description>Album Title</description>
                        <left>10</left>
                        <top>0</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>left</align>
                        <aligny>top</aligny>
                        <font>prom24</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>            
                    <control type="label">
                        <description>Track Title</description>
                        <left>10</left>
                        <top>0</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>left</align>
                        <aligny>top</aligny>
                        <font>prom24</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <left>10</left>
                        <top>28</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>left</align>
                        <aligny>bottom</aligny>
                        <font>prom16</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>                    
                    <control type="label">
                        <description>Duration</description>
                        <left>10</left>
                        <top>28</top>
                        <width>500</width>
                        <height>30</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>left</align>
                        <aligny>bottom</aligny>
                        <font>prom16</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>grey</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>                    
                </itemlayout>
                <focusedlayout height="52" width="270">
                    <control type="image">
                        <description>Highlight</description>
                        <left>-5</left>
                        <top>-2</top>
                        <width>290</width>
                        <height>50</height>
                        <texture>highlight.png</texture>
                    </control>            
                    <control type="label">
                        <description>Album Title</description>
                        <left>10</left>
                        <top>0</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Album]</label>
                        <align>left</align>
                        <aligny>top</aligny>
                        <font>prom24</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>            
                    <control type="label">
                        <description>Track Title</description>
                        <left>10</left>
                        <top>0</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Title]</label>
                        <align>left</align>
                        <aligny>top</aligny>
                        <font>prom24</font>
                        <textcolor>white</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>
                    <control type="label">
                        <description>Artist</description>
                        <left>10</left>
                        <top>28</top>
                        <width>270</width>
                        <height>30</height>
                        <label>$INFO[listitem.Artist]</label>
                        <align>left</align>
                        <aligny>bottom</aligny>
                        <font>prom16</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>orange</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>Container.Content(Albums)</visible>
                    </control>                    
                    <control type="label">
                        <description>Duration</description>
                        <left>10</left>
                        <top>28</top>
                        <width>500</width>
                        <height>30</height>
                        <label>$INFO[listitem.Duration]</label>
                        <align>left</align>
                        <aligny>bottom</aligny>
                        <font>prom16</font>
                        <textcolor>grey</textcolor>
                        <selectedcolor>grey</selectedcolor>
                        <shadowcolor>black</shadowcolor>
                        <visible>!Container.Content(Albums)</visible>
                    </control>                    
                </focusedlayout>
            </control>
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#5
Add a ListItem.Label (or use it as a fallback), as the ".." is part of that.
Reply
#6
How do i use it as a fallback, If i do this will it display the ".." then?
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply
#7
By using visibility conditions.

Simplified:

PHP Code:
<control type="label">
    <
label>$INFO[ListItem.Album]</label>
    <
visible>Container.Content(albums) + !IsEmpty(ListItem.Album)</visible>
    ...
</
control>

<
control type="label">
    <
label>$INFO[ListItem.Label]</label>
    <
visible>Container.Content(albums) + IsEmpty(ListItem.Album)</visible>
    ...
</
control

But seeing as you are already using a bunch of other conditions I would look into using variables. You would need only one label control instead of at least 5.

http://wiki.xbmc.org/index.php?title=XBM...#Variables
Reply
#8
Thanks will have a look, this looks like it could get complicated just to display ".." Lol
Old newbie trying his hardest to get his head around skinning lol, expect loads of questions :-)

It may be hard but the challenge of learning something new is fun :-)
Reply

Logout Mark Read Team Forum Stats Members Help
How do these work [listitem.Label] & [listitem.Label2]0