(2015-06-06, 03:29)mikesilvo164 Wrote: The visible condition says it is visible when label 4327 contains movie (you have to check label 4327 for more info wherever it may be in the skin xmls) and Skin.String(MovieSub6) is empty or not yet set, again you have to check for that string in the code but it looks like as long as you don't set movies sub 6 it'll be visible when label 4327 contains movie after Kodi parses that label. In other words when movie (years) section contains the default submenu. This is only me responding to your specific question without looking at the code since I do not know what the label contains...
I always dread answering questions in this thread...
The skin string I don't think is as important. It or various variants, doesn't always appear in these sub-menu items. The label 4327 does in every single one. Further in this Includes file is this
Code:
<control type="label" id="4327">
<label>$VAR[SubMenuVar]</label>
<include>HiddenObject</include>
</control>
Which calls to the Variables.xml as this
Code:
<variable name="SubMenuVar">
<value condition="Window.IsActive(1150)">$INFO[Window(1124).Property(SubmenuType)]$INFO[Window(1124).Property(custom1)]$INFO[Window(1124).Property(custom2)]$INFO[Window(1124).Property(custom3)]$INFO[Window(1124).Property(custom4)]$INFO[Window(1124).Property(custom5)]$INFO[Window(1124).Property(custom6)]$INFO[Window(1124).Property(custom7)]$INFO[Window(1124).Property(custom8)]$INFO[Window(1124).Property(custom9)]$INFO[Window(1124).Property(custom0)]</value>
<value condition="Window.IsActive(1122)">$INFO[Skin.String(ItemToEdit.SubMenu)]</value>
<value>$INFO[Container(9000).ListItem.Property(SubMenu)]</value>
</variable>
So I'm not sure if I'm following along correctly but it doesn't appear to be anything specific when it comes to anything outside of "Custom" main menu buttons set-up by the end user.
I've made a customer main menu button that is built into a mod of the skin directly, called Concerts. For this I want a sub-menu with "Comedy" and "Music" to split out stand-up concerts from musical performances. All of this as part of my default mod. The main Concerts button works (linked to a playlist, like other similar custom buttons) and I've come up with this for the sub-menu, but it just doesn't work.
Code:
<include name="DefaultSubConcerts">
<item>
<description>Concerts Comedy</description>
<label fallback="Comedy">$INFO[Skin.String(ConcertsComedyItem.Label)]</label>
<onclick>ActivateWindow(10025,"special://skin/extras/playlists/video/Concerts (Comedy).xsp", return)</onclick>
<visible>Substring(Control.GetLabel(4327),concerts)</visible>
<icon fallback="special://skin/backgrounds/Concerts Comedy/">$INFO[Skin.String(Concerts Comedy.MultiFanart)]</icon>
</item>
<item>
<description>Concerts Music</description>
<label fallback="Music">$INFO[Skin.String(ConcertsMusic.Label)]</label>
<onclick>ActivateWindow(10025,"special://skin/extras/playlists/video/Concerts (Music).xsp", return)</onclick>
<visible>Substring(Control.GetLabel(4327),concerts)</visible>
<icon fallback="special://skin/backgrounds/Concerts Music/">$INFO[Skin.String(ConcertsMusic.MultiFanart)]</icon>
</item>
</include>
For each item, the first line is the description. The second line names the button and gives it a label. The third line give the on-click command, to activate a smart playlist. Fourth line is the visibility string I'm stuck on. Last line gives it a custom background.
I know I am missing something but I'm not sure what