As designed Assigning Included Template to Add-On Not Saving When Viewed From Parent Template

Kevin

Well-known member
OK, that is a bit of lengthy title, I admit, but it is the best description I can come up with. :p

Let me explain the problem....
  • I created an add-on; something simple, Widget X for our example.
  • I created a new template, wxPage, intending to use it with Widget X but forgot to assign it to the add-on when creating the template.
  • For displaying the output of the contents on the wxPage I am using some custom CSS so I created a second template, wxPage.css, but also forget to assign it to the add-on.
  • I went back to the first template, wxPage, and fill in the content, and added tags to include the wxPage.css template.
  • The new Widget X is looking good so I export it the XML to try on a different site. Whoops! I am missing the templates.
  • I went back and edited the wxPage template and at the bottom of the page I assign it to the Widget X add-on.
  • Because wxPage is including wxPage.css, both templates are shown to me at the same time in the tab menu.
  • I click on the wxPage.css template from the tab menu and notice that the drop-down is already assigned to Widget X. Great!
  • I re-export the XML but notice now wxPage.css is still missing.
  • Go back to edit the templates, look at wxPage, is still assigned to Widget X, look at wxPage.css from the tabbed menu, that shows as being assigned to Widget X, but it doesn't get exported.
  • Ah, light bulb goes off... I explicitly edit wxPage.css and, sure enough, there the drop-down is not showing any association to Widget X. Assign it there, re-export the XML, all is good to.

Bug = When viewing a template that includes other templates, clicking on the other templates from the tabbed menu appears to show what add-on the parent template is associated with, if any, and not the add-on that the currently viewing/editing template is really associated to. :coffee:
 
I'm fairly sure the add-on field only relates to the main tab and not the associated tabs.

You will note that the template name, URL, etc. also don't change when viewing the other tabs.
 
Brogan is correct. UI is potentially a different story, but this is the designed/expected behavior. :)
 
Brogan is correct. UI is potentially a different story, but this is the designed/expected behavior. :)
I never said he wasn't correct, just that when viewing the othe tabs the drop-down should be either suppressed or disabled since it is not applicable to the content actually being edited even though it appears that it would be. I can't imagine that it was designed with that intent in mind.
 
Top Bottom