Hello
The content object is set on rendering and not by the iterator.
Try ${cmsfn:currentContent().product} in the iterator tag.
This write from mind, so it is not tested.
Regards
Frank
Am 19.10.2011 17:04 schrieb "Magnolia Forums (on behalf of Ola Mont?n)" <
[email protected]>:
>
>
> I have a pagetemplate in JSP that contains:
>
> <cms:contentNodeIterator contentNodeCollectionName="DocumentData">
> <cms:includeTemplate />
> </cms:contentNodeIterator>
> <cms:newBar contentNodeCollectionName="DocumentData"
paragraph="skaDocument" newLabel="New document" />
>
> and the paragraph that is rendered by includeTemplate contains:
>
> ${content.name} ${content.product} <br/>
>
> I've stripped all styling and other HTML code to clarify. This works just
fine, I can create new documents on the page, and they are all rendered on
the page.
>
> Now I want to create a drop-dowm on top on the page with a list of all
"content.product" to make it possible to filter the content on the page. So
in the page template, I want to add a loop before contentNodeIterator that
iterates through all DocumentData to collect the content.product values. But
how do I to that? This is not working:
>
> <% String products = ""; %>
> <cms:contentNodeIterator contentNodeCollectionName="DocumentData">
> <% products += ${content.product} + ","; %>
> </cms:contentNodeIterator>
>
> The question is really how can I get the content data in JSP code.
>
> Anyone that can help a newbee?
>
> --
> Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=3185a054-baaa-4e73-9e8a-97a5dd647c82
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------