Hi!

I have a pagetemplate where I want to embed random content from
another page. Therefor I perform a query from which result I randomly
choose a single ContentNode and store it in  some page scope
attribute.

String query = "/jcr:root//[EMAIL PROTECTED] order by @offerId"; // a small 
example
Collection results = ...is working and returns nodes from the website tree...;
pageContext.setAttribute("random", ...one of result...);

That random node exists and I can access it using ${random} -
...toString() shows info.magnolia.cms.core.Content[/path/in/page/0001]
for example.

Now I want to use the following:

<cms:includeTemplate contentNode="${random}" path="/templates/something
/main.jsp"/>

But the template is not filled with the proper content allthough it
works when used directly in the page (with contentNode="${actpage}").
So the template is fine. It uses <cms:out /> to extract properties
from the page. But when used with contentNode="${random}" from another
page it does not. Why?

--
Daniel Bleisteiner

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to