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 ( $canonicalPath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
104 #if ( !$canonicalPath )
105 #set ( $canonicalPath = "" )
107 #set ( $sitePath = $canonicalPath + $project.version + "/" )
108 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
110 <!-- name: $pages.get($alignedFileName).name -->
111 <!-- title: $title -->
112 <!-- short title: $shortTitle -->
113 <!-- current page: $alignedFileName -->
114 <!-- path: $sitePath -->
115 <!-- crumbs: $siteCrumbs -->
116 <!-- pages: $pages -->
121 xmlns="http://www.w3.org/1999/xhtml"
122 th:replace="~{/templates/layout.html :: layout(
123 uri='$sitePath$alignedFileName',
125 maincontent=~{:: .maincontent},
128 "_titles": {
130 #foreach($page in $pages)
132 "$sitePath$page.uri": "$page.name"
136 "_childs": {
138 #foreach($page in $pages)
139 #if(!$page.childs.isEmpty())
141 "$sitePath$page.uri": [
143 #foreach($child in $page.childs.entrySet())
145 "$sitePath$child.key"
153 "_crumbs": {
155 #foreach($page in $pages)
157 "$sitePath$page.uri": [
164 #foreach($crumb in $page.crumbs)
165 #if($sitePath+$crumb.uri != $last)
167 "$sitePath$crumb.uri"
169 #set($last = $sitePath+$crumb.uri)
180 <title id="title">#if($shortTitle and $shortTitle != '')$title#else$project.name — $pages.get($alignedFileName).name#end</title>
181 <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
182 <link id="canonical" rel="canonical" href="$canonicalPath$alignedFileName"/>
188 #foreach($crumb in $pages.get($alignedFileName).crumbs)<li><a href="$crumb.uri">$crumb.name</a></li>#end
192 <article class="maincontent">
199 #foreach($page in $pages)<li><a href="$page.uri">$page.name</a></li>#end