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:
/* 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.