3 <!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) -->
6 #set ( $pages = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
7 #set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() )
8 #macro ( buildPages $menu )
11 #set ( $currentItemHref = $PathTool.calculateLink( $menu.href, $relativePath ) )
13 #set ( $currentItemHref = '' )
15 #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
17 #if ($currentItemHref)
18 #set( $sinkhole = $stack.peek().childs.put($currentItemHref, $menu.name) )
21 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
22 #set ( $sinkhole = $page.put("name", $menu.name) )
23 #set ( $sinkhole = $page.put("uri", $currentItemHref) )
24 #set ( $sinkhole = $page.put("childs", $project.getClass().forName('java.util.LinkedHashMap').newInstance()) )
25 #set ( $sinkhole = $stack.push( $page ) )
28 #set( $sinkhole = $page.put("title", $menu.title) )
31 #set( $sinkhole = $page.put("alt", $menu.alt) )
34 #set( $sinkhole = $page.put("img", $menu.img) )
37 #foreach ( $item in $menu.items )
41 #set ( $page = $stack.pop() )
42 #if ( $page.uri != "" )
44 #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() )
45 #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
46 #set ( $sinkhole = $crumb.put("uri", $page.uri) )
47 #set ( $sinkhole = $crumb.put("name", $page.name) )
48 #set ( $sinkhole = $crumbs.push($crumb) )
49 #foreach ( $entry in $stack )
50 #if ( $entry.uri != "" )
51 #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
52 #set ( $sinkhole = $crumb.put("uri", $entry.uri) )
53 #set ( $sinkhole = $crumb.put("name", $entry.name) )
54 #set ( $sinkhole = $crumbs.push($crumb) )
57 #set ( $sinkhole = $page.put("crumbs", $crumbs) )
59 #if ( $pages.containsKey($page.uri) )
60 #set ( $childs = $pages.get($page.uri).childs )
61 #set ( $sinkhole = $page.put("childs", $childs) )
63 <!-- OVERWRITING PAGE - uri: $page.uri -->
66 <!-- NEW PAGE - - - - - uri: $page.uri -->
69 #set ( $sinkhole = $pages.put($page.uri, $page) )
73 <!-- DONE WITH MENUE - - #if($page.name)$page.name-->#else(no name)-->
74 #set( $siteTitle = $menu.title )
75 #set( $siteAlt = $menu.alt )
76 #set( $siteImg = $menu.img )
77 #set( $sinkhole = $pages.get("index.html").put("childs", $page.childs) )
85 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
86 #set ( $sinkhole = $page.put("uri", "index.html") )
87 #set ( $sinkhole = $page.put("name", "$project.name") )
88 #set ( $sinkhole = $stack.push($page) )
89 #foreach ( $menu in $decoration.body.menus )
90 ## Nur benannte Menüs werden berücksichtigt
95 #foreach ( $menu in $decoration.body.menus )
96 ## Nur unbenannte Menüs werden berücksichtigt
102 ## Custom Variablen einlesen
103 #set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
105 #set ( $sitePath = "" )
107 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
109 <!-- name: $pages.get($alignedFileName).name -->
110 <!-- title: $title -->
111 <!-- short title: $shortTitle -->
112 <!-- current page: $alignedFileName -->
113 <!-- path: $sitePath -->
114 <!-- crumbs: $siteCrumbs -->
115 <!-- pages: $pages -->
120 xmlns="http://www.w3.org/1999/xhtml"
121 th:replace="~{/templates/layout.html :: layout(
122 uri='$sitePath$alignedFileName',
125 "_names": {
127 #foreach($page in $pages)
129 "$sitePath$page.uri": "$page.name"
133 "_childs": {
135 #foreach($page in $pages)
136 #if(!$page.childs.isEmpty())
138 "$sitePath$page.uri": [
140 #foreach($child in $page.childs.entrySet())
142 "$sitePath$child.key"
150 "_crumbs": {
152 #foreach($page in $pages)
154 "$sitePath$page.uri": [
160 #foreach($crumb in $page.crumbs)
162 "$sitePath$crumb.uri"
173 <title id="title">#if($shortTitle and $shortTitle != '')$title#else$project.name — $pages.get($alignedFileName).name#end</title>
174 <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
175 <link rel="canonical" href="$sitePath$alignedFileName"/>
181 #foreach($crumb in $pages.get($alignedFileName).crumbs)<li><a href="$crumb.uri">$crumb.name</a></li>#end
185 <article class="maincontent">
192 #foreach($page in $pages)<li><a href="$page.uri">$page.name</a></li>#end