-
Bug
-
Resolution: Fixed
-
Major
-
3.5.4
-
None
-
-
Empty show more show less
If the Tag "includeTemplate" has the attribute "contentNodeName" as well as the attribute "path",
the content is rendered twice:
1) the standard template for the contentNodeName is used
2) then the template of the attribute "path" is used
example:
<cms:includeTemplate contentNodeName="headlineWithRichText" path="../../../paragraphs/teasers/headline_with_rich_text.jsp"/>
In my opinion, only one template should be used:
if there's a path attribute, take the template of the path attribute, otherwise take the standard template of the contentNode
When I look into the code of the File Include.java, there's following lines of code:
if (this.path!=null)
{
// TODO
log.warn("You are using the deprecated path attribute of the include tag. Your jsp will be included for now, but you might want to update your code to avoid bad surprises in the future.");
pageContext.include(this.path);
}
ParagraphRenderingFacade.getInstance().render(content, pageContext.getOut(), pageContext);
Wouldn't it be more correct to put the last line into the else branch of that if clause ?