(2017-03-10, 11:41)jurialmunkey Wrote: @Jereon - why don't you just make the widget in the skin without templates? i.e. make all your menu widgets with templates, but make the standalone ones in the skin and then set them with skin strings using the JustSelect method.
Cheers jm, That was my original implementation
It gets the job done with regards to having the widgets separate from the main menu. However, then I run into other limitations that are solved by using templates. In short, there will be different types of widget groups with several variable properties. The main one being the height of the widgets. And while I can use parameters to adjust the height of the item layouts in a "conventional" implementation, I cannot do the same for the height of the actual container.
For example, I want a widget to take the full height of the screen when it is the only widget configured, and use half of the height when there's two wigets, etc. Things like that.
The templates allow me to resize basically everything on the fly

. Maybe I could achieve most of the same result without templates by a lot of code duplication and basically making a setup for every possible combination of widgets, but I am all for lean coding
I have started replacing my original implementation with templates, and the code reduction is enormous already
Basically I guess what I would want is a "clonewidget" function, but for the entire menu and not only submenus. A function that automatically copies the widget setup to all menu items.