<cms:includeTemplate> ignores contentNode if defined for the tag
----------------------------------------------------------------
Key: MAGNOLIA-1272
URL: http://jira.magnolia.info/browse/MAGNOLIA-1272
Project: Magnolia
Issue Type: Bug
Components: taglibs
Reporter: Daniel Bleisteiner
Assigned To: Fabrizio Giustina
Priority: Critical
I've tried to use <cms:includeTemplate contentNode="${myNode}"
path="/path/to/jsp" /> to embed JSPs with <cms:out> data filled from a random
content node object. After a while I figured out that the content node is never
actually used by the tag if defined!
Check info.magnolia.cms.taglibs.Include#doEndTag(...) and the local variable
"content". If set, it is never actually used for anything else then aquiring
the template path (if not set). So I've fixed this for my local installation by
adding the following code:
Content content = this.contentNode;
if (content == null) {
// SNIPPED
}
// DANIEL BLEISTEINER
if (content != Resource.getCurrentActivePage(req) &&
!localContentNodeSet && content != null) {
Resource.setLocalContentNode(req, content);
localContentNodeSet = true;
}
I had strange experiences using contentNode="${actpage}" within the JSP and had
to check for that case. Maybe you know better.
Related to that I found out that <cms:out inherit="true"/> traverses the
request context path up and not the local content node's path I set. Is this
intended?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------