Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1434

Merge the hst:script logic into the existing hst:template logic

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Top
    • Resolution: Fixed
    • 2.20.00RC1
    • 2.20.00RC3, 2.20.00, 2.21.00
    • None
    • None

    Description

      Instead of having :

      [hst:template] > nt:base, mix:referenceable, hst:descriptive

      • hst:renderpath (string)
      • hst:isnamed (boolean)
      • hst:containers (string) multiple

      and

      [hst:script] > nt:base, mix:referenceable

      • hst:template (string) mandatory
      • hst:language (string)
      • * (string)

      where a script can be used for example by configuring a hst:renderpath like:

      hst:renderpath = jcr:/hst:hst/hst:configurations/democommon/hst:scripts/home.ftl

      We want to capture both concepts in just hst:template.

      So, the hst:template might be extended to:

      [hst:template] > nt:base, mix:referenceable, hst:descriptive

      • hst:renderpath (string)
      • hst:isnamed (boolean)
      • hst:containers (string) multiple
      • hst:script (string) mandatory
      • hst:language (string)
      • * (string)

      Now:
      1) A template now should either have the hst:renderpath or the hst:script property. Both of them will be ambiguous.
      2) The hst:script will contain the actual script, for example freemarker template
      3) When there is a hst:script and no hst:renderpath, the HST will create an implicit renderpath when reading the model. We have the following two options, I am not sure what is the best:
      a) jcr: + jcrNode.getPath()
      b) jcr: + jcrNode.getPath() + "." + hst:language

      If we opt for (a), than a template node that has a freemarker script should end with ".ftl" . If we opt for (b), the language must be set to 'ftl' for freemarker. When loading the repository based freemarker template, we need then to strip .ftl from the repo location.

      We need the extension (.ftl) in the url now to dispatch to the freemarker servlet...until we create a servlet to run any script language that dispatches to the correct script engine.

      Attachments

        Activity

          People

            wko Woonsan Ko (Inactive)
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: