<!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) -->
-## Automatisch generierte Seiten einlesen
#set ( $pages = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
-#macro ( buildPages $items )
- #foreach ( $item in $items )
- #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
- #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
- #set ( $sinkhole = $pages.put( $item.name, $currentItemHref ) )
- #if ( !$item.items.empty )
- #buildPages ( $item.items )
+#set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() )
+#macro ( buildPages $menu )
+
+ #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+
+ #if ($currentItemHref)
+ #set( $sinkhole = $stack.peek().childs.put($currentItemHref, $menu.name) )
+ #end
+
+ #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+ #set ( $sinkhole = $page.put("name", $menu.name) )
+ #set ( $sinkhole = $page.put("uri", $currentItemHref) )
+ #set ( $sinkhole = $page.put("childs", $project.getClass().forName('java.util.LinkedHashMap').newInstance()) )
+ #set ( $sinkhole = $stack.push( $page ) )
+
+ #foreach ( $item in $menu.items )
+ #buildPages ( $item )
+ #end
+
+ #set ( $page = $stack.pop() )
+ #if ( $page.uri != "" )
+
+ #if ( $pages.containsKey($page.uri) )
+ #set ( $childs = $pages.get($page.uri).childs )
+ #set ( $sinkhole = $page.put("childs", $childs) )
+
+ <!-- OVERWRITING PAGE - uri: $page.uri, name: "$page.name", childs: $page.childs -->
+ #else
+
+ <!-- NEW PAGE --------- uri: $page.uri, name: "$page.name", childs: $page.childs -->
#end
+
+ #set ( $sinkhole = $pages.put($page.uri, $page) )
+ #set ( $sinkhole = $page.remove("uri") )
+
+ #else
+
+ <!-- DONE WITH MENUE ---- #if($page.name)$page.name#else(no name)#end -->
#end
#end
+
+
+## Seiten einlesen
#foreach ( $menu in $decoration.body.menus )
## Nur benannte Menüs werden berücksichtigt
#if ($menu.name)
- #buildPages ( $menu.items )
+ #buildPages ( $menu )
#end
#end
+#foreach ( $menu in $decoration.body.menus )
+ ## Nur unbenannte Menüs werden berücksichtigt
+ #if (!($menu.name))
+ #buildPages ( $menu )
+ #end
+#end
+
<!-- $pages -->
+
+
#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
#macro ( searchBreadcrumbTrail $items )
#set ( $sep = '' )