Is it not possible to add a condition to the <label> tag?
#1
Hi Guys,

Just a quick question, is it not possible to add a condition attribute to the label tag?

For example, would the following not work?

PHP Code:
<label condition="System.HasAddon(script.skin.helper.service)">$INFO[Window(Home).Property(SkinHelper.RottenTomatoesRating)]</label

I have tried this but it seems to be ignoring the condition and displaying the label regardless. Huh

Thanks
Reply
#2
Code:
<variable name="MyLabelVar">
<value condition="System.HasAddon(script.skin.helper.service)"">$INFO[Window(Home).Property(SkinHelper.RottenTomatoesRating)]</value>
<value>No Skin Helper Service addon installed</value>
</variable>

Code:
<control type="label>
.....
<label>$VAR[MyLabelVar]</label>
...
</control>


http://kodi.wiki/view/Skinning_Manual#Variables
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
Thanks suallfred. I was trying to avoid using a variable lol, hence the attempt at using a label condition. I guess it's not possible Sad
Reply
#4
If you really don't want to use a variable (although I see no reason not to) you'll have to repeat the various labels and add a visible condition instead.

PHP Code:
<control type="label">
    ...
    <
label>$INFO[Window(Home).Property(SkinHelper.RottenTomatoesRating)]</label>
    <
visible>System.HasAddon(script.skin.helper.service)</visible>
</
control>
<
control type="label">
    ...
    <
label>SOME_OTHER_LABEL</label>
    <
visible>SOME_OTHER_CONDITION</visible>
</
control>
etc 
Reply
#5
Cheers Hitcher, I guess I'll have to follow that route. I'm modding a skin file and only want to modify just the one file to allow me to easily install future skin updates and just replace the one file I've modded. Variables require an additional file to be modified, that was my only reason for not wanting to. Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Is it not possible to add a condition to the <label> tag?0