Conditionally Include section of .xml code
#1
I have the following piece of .xml that i am calling from Includes.xml in DialogSelect.xml:

Code:
<include content="DialogBackgroundCommons">
                <param name="width" value="1220" />
                <param name="height" value="742" />
                <param name="header_label" value="" />
                <param name="header_id" value="1" />
            </include>

I dont want this to be visible in one specific window where a dialog box is opened. Ive been reading the stuff on conditional viability, but I'm not really sure what code to use to implement what I want. Can anyone assist?

Thanks
Reply
#2
are you looking for something like this?
xml:
<include content="DialogBackgroundCommons" condition="!Window.IsVisible(xxx)">
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Hi thanks for replying. Yes this is almost what I want. I actually have a scenario though where I don’t want an include to be visible in one specific window. Is there a way of doing that? Or alternatively and perhaps more clumsily, could you use multiple isvisible statements for the Windows I do want the include to appear in?
Reply
#4
(2018-03-19, 10:05)gdogg371 Wrote: Hi thanks for replying. Yes this is almost what I want. I actually have a scenario though where I don’t want an include to be visible in one specific window. Is there a way of doing that?
 well that's what the code i posted is suppossed to do.
it'll be visible in all windows except for the one you specify in the condition.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
@gdogg371 - In the code supplied by ronie, the exclamation mark "!" functions as a NOT operator.
!Window.IsVisible(xxx) means "only when xxx window is NOT visible"
Read here for more info on conditionals:
https://kodi.wiki/view/Skinning_Manual#C...Conditions
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#6
Sorry for not coming back to this straight away. I have been away with work. Yes that did exactly what I wanted. I was not aware that "!" resolves to 'is not' in the skinning language. Thanks for your assistance.
Reply

Logout Mark Read Team Forum Stats Members Help
Conditionally Include section of .xml code0