- #if ( $pages.containsKey($page.uri) )
- #set ( $childs = $pages.get($page.uri).childs )
- #set ( $sinkhole = $page.put("childs", $childs) )
+ #set ( $page = $stack.pop() )
+ #if ( $page.uri != "" )
+
+ #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() )
+ #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+ #set ( $sinkhole = $crumb.put("uri", $page.uri) )
+ #set ( $sinkhole = $crumb.put("name", $page.name) )
+ #set ( $sinkhole = $crumbs.push($crumb) )
+ #foreach ( $entry in $stack )
+ #if ( $entry.uri != "" )
+ #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+ #set ( $sinkhole = $crumb.put("uri", $entry.uri) )
+ #set ( $sinkhole = $crumb.put("name", $entry.name) )
+ #set ( $sinkhole = $crumbs.push($crumb) )
+ #end
+ #end
+ #set ( $sinkhole = $page.put("crumbs", $crumbs) )