I am using $user.psoNavTools.getAncestors($nav.self) to get a list of the navons that form a branch from the navigation tree, from the navtree down to the nearest navon of the item that is being assembled into a page, in order to generate a breadcrumb/cookie trail. Here’s the simplified code in the snippet template…
#foreach($n in $user.psoNavTools.getAncestors($nav.self))
<a href="$n.getProperty("nav:url").String">$n.getProperty("rx:displaytitle").String</a> ...
#end
… which is called in the global template using #slot(“rffNav” “” “” “” “” “template=testBreadcrumbs”)
This works fine until someone selects an item that has a linked copy somewhere else in the Rhythmyx repository as a landing page. Then, the getProperty(“nav:url”).String method can return a URL to either version. I do not know how it picks which version but, a lot of the time, this means the visitor to the web site will be taken to a completely different section when they click what should be a link to a landing page further up in the same section of the web site.
Can anyone shed some light on this? Does this effectively rule out the use of linked copies for anything that might be a landing page?
Thanks,
Andrew.