2016-01-14, 07:55
In a bit of a thinking mood regarding the templates.
As far as I understand skin shortcuts will write to the script-skinshortcuts-includes.xml like this;
Could it be possible with some simple code changes to write to the xml like this?
I am thinking about the insane amount of variables in madnox (even more after adding the mixed widget). Being around 4 variables for each image, label ect with the only difference being the container number.
If I could use a variable within the template I can then use $PARAM[Id]. Each and every widget would then have a unique id, it would greatly reduce the variables and animations between menu items would be much smoother. Just a hunch on the reported disappearing widget issue, I am suspecting it could be related to using the same panel id. (i cant replicate the issue though myself). I must say though along the road of coding the widgets the same panel id between menu items has caused many coding headaches and i have had to find ways around the issue.
EDIT: Not sure if this a viable idea though as this would certainly add a lot more string compares and bloat the code in the script-skinshortcuts-includes.xml if there were many widgets setup. I have been trying to figure out how to have separate panel ids for each widget for a while now and thinking it may not be possible.
As far as I understand skin shortcuts will write to the script-skinshortcuts-includes.xml like this;
Code:
<include name="skinshortcuts-template-widgetPanel2">
....stuff here
</include>
Could it be possible with some simple code changes to write to the xml like this?
Code:
<variable name="HomeWidgetArt">
....stuff here
</variable>
I am thinking about the insane amount of variables in madnox (even more after adding the mixed widget). Being around 4 variables for each image, label ect with the only difference being the container number.
If I could use a variable within the template I can then use $PARAM[Id]. Each and every widget would then have a unique id, it would greatly reduce the variables and animations between menu items would be much smoother. Just a hunch on the reported disappearing widget issue, I am suspecting it could be related to using the same panel id. (i cant replicate the issue though myself). I must say though along the road of coding the widgets the same panel id between menu items has caused many coding headaches and i have had to find ways around the issue.
EDIT: Not sure if this a viable idea though as this would certainly add a lot more string compares and bloat the code in the script-skinshortcuts-includes.xml if there were many widgets setup. I have been trying to figure out how to have separate panel ids for each widget for a while now and thinking it may not be possible.