[ http://jira.magnolia.info/browse/MAGNOLIA-1272?page=all ]
Vivian Steller resolved MAGNOLIA-1272.
--------------------------------------
Resolution: Fixed
included your code snippet. Thanks for your help, Daniel.
> 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?
I think that this is not true (at least anymore): as far as I can see
BaseContentTag uses currentPage.getParent() (line 139) to traverse the tree to
the root.
Please correct me if I'm wrong and open a new issue if you think this should
still be changed.
Thanks again for your help.
> <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
> Affects Versions: 3.0 Final
> Reporter: Daniel Bleisteiner
> Assigned To: Vivian Steller
> Priority: Critical
> Fix For: 3.1
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> 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://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------