From 2c7eeb1327d572434beef1a8a706d8bebf86be0e Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jul 2016 09:22:54 +0200 Subject: [PATCH] Reworked the processing of the page-data (again) Breadcrumb-paths are generated for all pages. --- src/main/resources/META-INF/maven/site.vm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index c91a1b2..2577a89 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -26,14 +26,25 @@ #set ( $page = $stack.pop() ) #if ( $page.uri != "" ) + #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() ) + #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) ) + #if ( $pages.containsKey($page.uri) ) #set ( $childs = $pages.get($page.uri).childs ) #set ( $sinkhole = $page.put("childs", $childs) ) - + #else - + #end #set ( $sinkhole = $pages.put($page.uri, $page) ) -- 2.20.1