Uploaded image for project: 'Labs (Retired)'
  1. Labs (Retired)
  2. LABS-241

[web] Templates nesting/includes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Current
    • Future
    • Magma
    • None

    Description

      While it is possible to extend a template class with another template class, and inherit/override as usual, this is not currently possible on an HTML level.

      That means that a web site will have a TempateA.java and a TemplateA.html. Then a TemplateB.java, extending TemplateA and simply overriding and cutomizing stuff, but must have a TemplateB.html file (if needed) that must redefine everything that was in TemplateA.html.

      It would be nice to have a TemplateB.html that simply "patches" TemplateA, but unfortunately this is not so easy, because there is no known standard on patching an HTML file. XSLT could be a way, but that would be rather an extension than a new feature.

      Instead, this lack can be mitigated having a way to include a template in another template. This way, common parts between TemplateA and TemplateB could be refactored out in, say, FooterTemplate, HeaderTemplate and so on.

      We still need to investigate wether this kind of inclusion should be done in the java class, using the current layout system, and/or in HTML directly.

      Attachments

        Activity

          People

            s.gianni Simone Gianni
            s.gianni Simone Gianni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: