Uploaded image for project: 'Processed Resources App'
  1. Processed Resources App
  2. PROCRES-2

Subnodes are not appended

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Neutral
    • None
    • 1.0
    • None

    Description

      Javadoc for ResourcesTextTemplateRenderer says:

      This renderer uses the content and its subnodes as a Freemarker template source. Subnodes are appended to the content of the current node.

      A comment in a CSS file that we bootstrap into the resources workspace says the same:

      /sample-css/using-freemarker
      /* child nodes are inlined */
      

      I expected that the content of child nodes is appended to the parent node but this is not happening. Only the parent is served.

      I had to manually add a Freemarker directive at the end of the parent file to iterate through the child nodes and render their content such as:

      [#list cmsfn.children(content) as child ]
          ${cmsfn.decode(child).text}
      [/#list]
      

      To reproduce the issue, request the parent node http://localhost:8080/magnoliaAuthor/resources/sample-css

      • Expected result: Child node /sample-css/using-freemarker is appended to the parent.
      • Actual result: Only the parent is served.

      The ability to merge child nodes fits the use case of merging multiple small JavaScript files into a single file.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              ahietala Antti Hietala
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD