Kodi Community Forum

Full Version: Conditional visibility of a group or include
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can I add conditions to includes or groups instead of having the same condition for several controls?
sure, for groups it works 100%... never tried it for includes but I see no reason why it wouldn't
Includes simply drop the XML in the include inline into wherever the include is drawn from - XBMC only sees the complete XML. Thus, it'll work identically.
What am I doing wrong in this then?

Code:
<include condition="Container.Content(tvshows)">TV_Shows_banner</include>
The container content isn't know when the window loads.
I'm still struggling with all of this Smile
How would I make different controls come up for different contents?
Do I have to make a visibility condition for every control?
PHP Code:
<control type="list" id="50">
    <
visible>Container.Content(movies)</visible>
    [...]
</
control>

<
control type="list" id="51">
    <
visible>Container.Content(tvshows)</visible>
    [...]
</
control

or

PHP Code:
<control type="list" id="50">
    [...]
    <
itemlayout condition="Container.Content(movies)">
    </
itemlayout>
    <
itemlayout condition="Container.Content(tvshows)">
    </
itemlayout>
    <
focusedlayout condition="Container.Content(movies)">
    </
focusedlayout >
    < 
focusedlayout condition="Container.Content(tvshows)">
    </
focusedlayout >
</
control