Kodi Community Forum

Full Version: Get self.control.id with skin engine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I'm trying to pull out some xml coding stunts here. Having a fixedlist container with id="$param[widgetid]".
While 
Code:
Control.HasFocus($param[widgetid])
works fine,
something like 
Code:
Integer/String.IsEqual($param[widgetid],1510)
does not.

What I'm trying to achieve is to give different ids different includes. But I can't figure out to get the current control (after assigned with id) to identify itself (with no focus).
Is there a proper way of doing this?

EXAMPLE:
Code:
<control type="$PARAM[containerType]" id="$PARAM[widgetid]">
<include condition="CONTROLID == 1510 (pseudu-code)">foo</include>
<include condition="CONTROLID == 1520">bar</include>
etc...
</control>

Thanks.
just name the indclude differently

Code:

<include>my-include-for-id-$PARAM[widgetid]</include>
(2019-01-15, 15:23)sualfred Wrote: [ -> ]just name the indclude differently

Code:

<include>my-include-for-id-$PARAM[widgetid]</include>
 I didn't get ur suggestion. Can you give a more concrete ex?

@sualfred ?
Code:

<control type="$PARAM[containerType]" id="$PARAM[widgetid]">
<include>foo-$PARAM[widgetid]</include>
</control>

Code:

<include name="foo-1510">
...
</include>

<include name="foo-1512">
...
​​​​​​​</include>
(2019-01-21, 15:51)sualfred Wrote: [ -> ]
Code:

<control type="$PARAM[containerType]" id="$PARAM[widgetid]">
<include>foo-$PARAM[widgetid]</include>
</control>
Code:

<include name="foo-1510">
...
</include>

<include name="foo-1512">
...
</include>
one of those 'how didn't i think of it' moments Smile
Thanks a lot!