From: Kai Moritz Date: Fri, 8 Jul 2016 07:22:54 +0000 (+0200) Subject: Reworked the processing of the page-data (again) X-Git-Tag: maven-thymeleaf-skin-1.0.0~22 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=2c7eeb1327d572434beef1a8a706d8bebf86be0e;p=maven-thymeleaf-skin Reworked the processing of the page-data (again) Breadcrumb-paths are generated for all pages. --- 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) )