2017-03-14, 20:17
(2017-03-13, 02:14)Guilouz Wrote: How to link the two then ?
If I understand correctly what you're trying to do then I can't offer any advice on doing this, as it's just not something the script is designed to do.
(2017-03-13, 20:22)Jeroen Wrote: Since Kodi variables don't allow numeric values I am wondering if there is a smart way to go about this in templates. Sorry if this is basic..
I have a group of widgets. The width of the container is the same for every widget, the width of their itemlayouts vary. I want the width and the horizontal position of the container to change based on a skin setting or custom property, whichever works best.
So I have tried:
Code:<property name="left" tag="property" attribute="name|customProperty" value="customValue">128</property>
<property name="left">0</property>
<property name="width" tag="property" attribute="name|customProperty" value="customValue">500</property>
<property name="width">1920</property>
Which in essence works, except it brings Kodi to an absolute crawl.
I am probably missing an obvious more sensible way to do this
I use a very similar method with no issues - and, as the final template should have the values written in, it really shouldn't cause any performance issues that I can think of. It's worth checking that the final built template looks as you expect it to. Alternatives could be using multiple templates depending on conditions, or having different includes dependant on properties. You can even get creative with a little bit of Python....