2016-05-02, 22:53
(2016-05-02, 22:38)willcmuk Wrote: Hi Bob,
Yes template.xml is setup correctly as far as I'm aware, here's the code for the sub menu widget - http://pastebin.com/j2wrR0Jr
There are two content properties (I copied it from the acrtic.zephyr main widget code but made some changes including changing the content variable to reference the sub menu instead of the main one) I presume the second content property is a fallback? In either case both don't seem to be working.
The <content> is outputting in script.shortcuts.include like so:
Code:<content limit="50" target="" />
which doesn't seem right to me - there's nothing there, in the main menu widget the same field is outputting like so:
Code:<content limit="50" target="video">plugin://script.extendedinfo?info=trendingmovies</content>
Which is strange as my sub-menu widget code in template.xml is more or less a duplicate of the main menu widget (code for main menu widget - http://pastebin.com/cHPCZgHe ) - am I missing something?
OK, there's a (4) I overlooked
(4) The template is built, but the property is empty (an empty value is written to the template instead of the value from the menu item). This means the menu item that the template is being built from doesn't have any value in the property specified or the template doesn't support properties (mainmenu and submenu templates). The most common cause for this is that the wrong type of template is being used and so the template isn't being built from the properties you think it is - and indeed you're using a submenu template (which builds a template which displays each individual submenu of each main menu item), rather than a submenuOther template, which builds a template based on the properties of each individual submenu item.
Review the docs for the different types of template, but it should be as simple as changing <submenu /> to <submenuOther />.