Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12893

Support bundle selection in hst:webfile tag library

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • 3.1.0
    • None
    • site-toolkit
    • None

    Description

      Currently, <hst:webfile/> tag cannot create a link if the webfile resource is located under a non-default bundle. e.g, jcr:/webfiles/eforms/js/eforms-validation.js.

      In this case, we cannot generate a url through <hst:webfile/> tag.

      schrijvers has a great idea like this:

      I think we can quite easily improve this support. Currently, we use <hst:webfile /> tag to create webfiles links. For example <hst:webfile path="/image /myImage.png" />

      We could add an attribute that specifies a different root bundle (~ context-path) to be used. For example

      <hst:webfile path="/images/myImage.png" bundle="eforms"/>

      I think this is a great idea.

      Note that apart from being able to specify a specific bundle in the hst:webfile tag we should also be able to specify a custom bundle for freemarker templates being referenced. Perhaps this is easiest achieved by supporting on the hst:template nodes a new property, something like hst:bundle(name) : In case that property is present, not the default 'site' or contextpath bundle is used but the one specified. We need to account for this in org.hippoecm.hst.freemarker.jcr.WebFileTemplateLoader .... most likely not hard (at all)

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: