Hi Hay,
Which sub-nodes are you referring to ?
If you're doing this in a paragraph, ${content} refers to the current
paragraph's node. ${mgnl.siblings(content)} creates an instance of
"SiblingsHelper" based on the given node, which in turn, by defaults, uses the
given node's type to filter out which nodes it wants to navigate to/from. Long
story short, you probably want ${mgnl.siblings(page)} instead. If that doesn't
help, then we have a bug.
Cheers,
-g
On Mar 1, 2010, at 17:11, Hay (Husky) wrote:
>
> 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]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------