nav:axis property malfunction when items are not navons

Is anyone else seeing this issue? I’m having whole slews of links showing up in breadcrumbs because many nodes are showing up as SELF nodes.

I’ve had to rewrite rffSnNavBreadcrumb to look something like this:


#set( $callingNode = $sys.assemblyItem.cloneParentItem.node )
#set( $callingId = $callingNode.getProperty('rx:sys_contentid').String )
#set( $landingId = $nav.self.getProperty('nav:landingPage').getNode().getProperty('rx:sys_contentid').String )
#set( $isNotLeaf = $callingId.compareTo($landingId) == 0 )
##$callingId $landingId $isNotLeaf >

#macro(itemTitle $item)
## use short_title if available to conserve screen real-estate
#set($t = $item.getProperty('rx:short_title').String )
#if($t.length() == 0)
## use full-length title when no short_title is available
#set($t = $item.getProperty('rx:displaytitle').String )
#end
${t}##
#end

#macro(title $node)
#if($node.hasProperty('nav:landingPage'))
#set($lpItem = $node.getProperty('nav:landingPage').getNode() )
#itemTitle($lpItem)
#else
## handle navons that don't have landing pages, but are external links.
$node.getProperty('rx:displaytitle').String##
#end
#end

#macro(ancestornode $node)
    #landinglink($node)
     : 
#end

#macro(selfnode $node)
	#if( $isNotLeaf )
		#title($node)
	#else
		#landinglink($node)
		 : 
		#itemTitle($callingNode)
	#end
#end

#macro(landinglink $node)
    #set($title = "#title($node)" )
	#set($landing_page = $node.getProperty("nav:url").String)
    #if( $landing_page )
    <a href="$landing_page" name="&lid=breadcrumb-$title">$title</a>
    #else
    $title
    #end
#end

#set($node = $nav.self)
#set($bc = "#selfnode($node)")
#foreach($i in [1..20])
	#if($node && $node != $nav.root && $node.parent)
		#set($node = $node.parent)
		#set($bc = "#ancestornode($node) $bc")
	#end
#end

	<div class="breadcrumbs">
		$bc
	</div>

For what it’s worth, it seems that this issue stems from having content items that are not navons in the Submenu slot that are in the same directory as another item in that slot.

Apparently, SELF, PARENT, and ANCESTOR nodes are determined not by slot relationship but by content explorer path. If you have an index item in a folder set as the landing page in the navon and other items in the same folder set as submenu, then all those items will show us as “SELF” when traversing the navigation tree.

Can anyone confirm this?

I was always under the impression that $nav referred to the navigation content item (navon or navtree). So a $nav.self mean the navon that was in the same folder as the current item. Thus for two items that are in the submenu slot of a navigation item that are in the same folder would reference the same navon with $nav.self.

So this is as designed, but undocumented, then?

I believe that since managed navigation was a pso implementation/feature/solution, documentation for that is not upto “par” with the rest of the RX documentation. I would like to see it be an official RX feature though as the navigation is somewhat important. I’m sure the percussion folks can correct me if I’m wrong or the official position on managed navigation.

I would call it a “feature.” :slight_smile: I don’t recall any documentation on managed navigation, but it has been quite a while since I’ve looked at documentation, so I may have missed a section…

The Implementation Guide (Version 6.7 link) includes a chapter on Managed Navigation, beginning on p. 279.

Nav:axis is documented as one of a set of properties unique to Navons; see “Navon Properties”, p. 307.

RLJII