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 )
10 #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
11 #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
13 #if ($currentItemHref)
14 #set( $sinkhole = $stack.peek().childs.put($currentItemHref, $menu.name) )
17 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
18 #set ( $sinkhole = $page.put("name", $menu.name) )
19 #set ( $sinkhole = $page.put("uri", $currentItemHref) )
20 #set ( $sinkhole = $page.put("childs", $project.getClass().forName('java.util.LinkedHashMap').newInstance()) )
21 #set ( $sinkhole = $stack.push( $page ) )
24 #set( $sinkhole = $page.put("title", $menu.title) )
27 #set( $sinkhole = $page.put("alt", $menu.alt) )
30 #set( $sinkhole = $page.put("img", $menu.img) )
33 #foreach ( $item in $menu.items )
37 #set ( $page = $stack.pop() )
38 #if ( $page.uri != "" )
40 #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() )
41 #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
42 #set ( $sinkhole = $crumb.put("uri", $page.uri) )
43 #set ( $sinkhole = $crumb.put("name", $page.name) )
44 #set ( $sinkhole = $crumbs.push($crumb) )
45 #foreach ( $entry in $stack )
46 #if ( $entry.uri != "" )
47 #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
48 #set ( $sinkhole = $crumb.put("uri", $entry.uri) )
49 #set ( $sinkhole = $crumb.put("name", $entry.name) )
50 #set ( $sinkhole = $crumbs.push($crumb) )
53 #set ( $sinkhole = $page.put("crumbs", $crumbs) )
55 #if ( $pages.containsKey($page.uri) )
56 #set ( $childs = $pages.get($page.uri).childs )
57 #set ( $sinkhole = $page.put("childs", $childs) )
59 <!-- OVERWRITING PAGE - uri: $page.uri, path: $crumbs, name: "$page.name", childs: $page.childs -->
62 <!-- NEW PAGE - - - - - uri: $page.uri, path: $crumbs, name: "$page.name", childs: $page.childs -->
65 #set ( $sinkhole = $pages.put($page.uri, $page) )
69 <!-- DONE WITH MENUE - - #if($page.name)$page.name-->#else(no name)-->
70 #set( $siteTitle = $menu.title )
71 #set( $siteAlt = $menu.alt )
72 #set( $siteImg = $menu.img )
73 #set( $sinkhole = $pages.get("index.html").put("childs", $page.childs) )
81 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
82 #set ( $sinkhole = $page.put("uri", "index.html") )
83 #set ( $sinkhole = $page.put("name", "$project.name") )
84 #set ( $sinkhole = $stack.push($page) )
85 #foreach ( $menu in $decoration.body.menus )
86 ## Nur benannte Menüs werden berücksichtigt
91 #foreach ( $menu in $decoration.body.menus )
92 ## Nur unbenannte Menüs werden berücksichtigt
98 ## Custom Variablen einlesen
99 #set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
101 #set ( $sitePath = "" )
103 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
105 <!-- title: $title -->
106 <!-- short title: $shortTitle -->
107 <!-- current: $alignedFileName -->
108 <!-- path: $sitePath -->
109 <!-- crumbs: $siteCrumbs -->
110 <!-- pages: $pages -->
114 xmlns="http://www.w3.org/1999/xhtml"
115 xmlns:layout="http://www.thymeleaf.org"
116 layout:decorator="templates/layout"
118 uri='$sitePath$alignedFileName',
119 json='merge:{"pages":{#set($sep = "")#foreach($page in $pages)$sep"$sitePath$page.uri":{"name":"$page.name",#if(!$page.childs.isEmpty())"childs":{#set($csep = "")#foreach($child in $page.childs.entrySet())$csep"$sitePath$child.key":"$child.value"#set($csep = ",")#end},#end"crumbs":[#set($csep = "")#if($siteCrumbs)$siteCrumbs#set($csep = ",")#end#foreach($crumb in $page.crumbs)$csep{"uri":"$sitePath$crumb.uri","name":"$crumb.name"}#set($csep = ",")#end]#if($page.title),"title":"$page.title"#end#if($page.alt),"alt":"$page.alt"#end#if($page.img),"img":"$page.img"#end}#set($sep = ",")#end}#if($siteTitle),"site_title":"$siteTitle"#end#if($siteAlt),"site_alt":"$siteAlt"#end#if($siteImg),"site_img":"$siteImg"#end}'
123 <title>juplo - $title</title>
124 <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
125 <link rel="canonical" href="$sitePath$alignedFileName"/>
131 #foreach($crumb in $pages.get($alignedFileName).crumbs)<li><a href="$crumb.uri">$crumb.name</a></li>#end
135 <article class="main" layout:fragment="maincontent">
136 <header><h1>$shortTitle</h1></header>
143 #foreach($page in $pages)<li><a href="$page.uri">$page.name</a></li>#end