Kodi Community Forum

Full Version: text in includes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have a long text i'd like to use at many places in the skin as a condition. i'd like to include it in includes.xml, like i include a constant. is this possible?
r1ctus Wrote:i have a long text i'd like to use at many places in the skin as a condition. i'd like to include it in includes.xml, like i include a constant. is this possible?
I believe <constants> can only be numeric.
But you can do:
Code:
<include name="mylabel">
   <label>text</label>
</include>

<control type="label">
    <include>mylabel</include>
    <posx></posx>
    <posy></posy>
</control>

or include the complete <control>
sorry, i dont think i asked the question clearly. the text i'd like to include is a long condition, part of it is this:
Code:
[Skin.String(CurrentViewMode,50) + Skin.HasSetting(ShowMusicIconTopBar) + Window.IsActive(MusicLibrary)]
i'd like to use this text as a condition in the skin somehow like this:
Code:
<animation effect="slide" end="0,-43" condition="**The Condition I Included***">Conditional</animation>
i hope my question is easier to understand this way.
r1ctus Wrote:sorry, i dont think i asked the question clearly. the text i'd like to include is a long condition, part of it is this:
Code:
[Skin.String(CurrentViewMode,50) + Skin.HasSetting(ShowMusicIconTopBar) + Window.IsActive(MusicLibrary)]
i'd like to use this text as a condition in the skin somehow like this:
Code:
<animation effect="slide" end="0,-43" condition="**The Condition I Included***">Conditional</animation>
i hope my question is easier to understand this way.

you can create a control (button control for example), set its visibilty condition (the one you want to use) and give it an id (65 for example). then you can use condition="control.isvisible(65)"