Hello.
I'm trying to reuse existing content of one page on another.
I've succeed in a "static" approach when some footer is shared amond all the
templates.
That was easy
1) include some footer.jsp in all the templates
2) footer.jsp: [code]<cms:contentNodeIterator path="/my-project/footer">
<cms:includeTemplate noEditBars="true"/>
</cms:contentNodeIterator>[/code]
This going to create a node collection visible in JCR Browser only
(/my-project/footer). Good.
Now same result is needed when site editor picks a page to include.
For that purpose I've made a dialogue with uuid field (named "page"). Idea is
to iterate though content of page with this uuid.
Expected behaviour for a newbie such as me would be:
[code]<cms:contentNodeIterator uuid="${content.page}"
contentNodeCollectionName="someCollection">
<cms:includeTemplate />
</cms:contentNodeIterator>[/code]
Unfortunately it doesn't work.
Instead some inline java code had to be used. Its working but confusing to say
the least.
[code]<%@page
import="info.magnolia.cms.link.UUIDLink,info.magnolia.link.LinkUtil "%>
<c:set var="uuidLink" value="${content.page}"/>
<%
String uuidLink = (String) pageContext.findAttribute("uuidLink");
String link = LinkUtil.convertUUIDtoHandle(uuidLink, "website");
pageContext.setAttribute("destPath", link);
%>
<cms:contentNodeIterator path="${destPath}/someCollection">
<cms:includeTemplate />
</cms:contentNodeIterator>
[/code]
Can same result be achieved with existing taglibs?
Cheers. Lauri.
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=a3152123-ddc5-4cf0-8a24-00dcdacdc39e
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------