Kodi Community Forum
$INFO labels with Skin.ToggleSetting & Skin.HasSetting - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: $INFO labels with Skin.ToggleSetting & Skin.HasSetting (/showthread.php?tid=303030)



$INFO labels with Skin.ToggleSetting & Skin.HasSetting - mgonzales - 2017-01-04

Been trying various way to do the following but keep getting parse errors or settings where the $INFO didn't expand and the setting literally contained $INFO[....] as part of the setting ID.

would like to create a toggle control that does the following but with correct syntax

Code:
        <control type="radiobutton">
            <label>Toggle Foo</label>
            <onclick>Skin.ToggleSetting(foo-$INFO[Container.FolderPath]-$INFO[Window.Property(xmlfile)])</onclick>
            <selected>Skin.HasSetting(foo-$INFO[Container.FolderPath]-$INFO[Window.Property(xmlfile)])</selected>
        </control>

that in turn creates a skin setting like:

Code:
<setting id="foo-addons://-AddonBrowser.xml" type="bool">true</setting>

That can be use as conditional elsewhere in the skin

I had a thought just now that maybe this is one of those times that requires the use of $ESCINFO[] ?

Any help would be appreciated.

Thanks!

Mario