Hi everyone,
i'm trying to build a 'previous / next' navigation using the
mgnl.siblings method in a Freemarker template. However, i'm running
into some problems with this method.
I'm requesting the siblings for the current page, and on the basis of
that assign title and link to different values:
[#assign siblings = mgnl.siblings(content) /]
[#if !siblings.first]
<a href="${mgnl.createLink(siblings.prev())}">Previous page</a>
[/#if]
[#if !siblings.last]
<a href="${mgnl.createLink(siblings.next())}">Next page</a>
[/#if]
However, this seems to fail in sub-nodes because the sibling utility
also uses other content nodes (such as the 'main' and 'extras' nodes)
and tries to make links for that. Is there some way to force siblings
to only get pages?
Thanks,
-- Hay
Frontend developer VPRO Netherlands
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------