2 <!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) -->
5 #set ( $pages = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
6 #set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() )
7 #macro ( buildPages $menu )
9 #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
10 #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
12 #if ($currentItemHref)
13 #set( $sinkhole = $stack.peek().childs.put($currentItemHref, $menu.name) )
16 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
17 #set ( $sinkhole = $page.put("name", $menu.name) )
18 #set ( $sinkhole = $page.put("uri", $currentItemHref) )
19 #set ( $sinkhole = $page.put("childs", $project.getClass().forName('java.util.LinkedHashMap').newInstance()) )
20 #set ( $sinkhole = $stack.push( $page ) )
23 #set( $sinkhole = $page.put("title", $menu.title) )
26 #set( $sinkhole = $page.put("alt", $menu.alt) )
29 #set( $sinkhole = $page.put("img", $menu.img) )
32 #foreach ( $item in $menu.items )
36 #set ( $page = $stack.pop() )
37 #if ( $page.uri != "" )
39 #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() )
40 #foreach ( $entry in $stack )
41 #if ( $entry.uri != "" )
42 #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
43 #set ( $sinkhole = $crumb.put("uri", $entry.uri) )
44 #set ( $sinkhole = $crumb.put("name", $entry.name) )
45 #set ( $sinkhole = $crumbs.push($crumb) )
48 #set ( $sinkhole = $page.put("crumbs", $crumbs) )
50 #if ( $pages.containsKey($page.uri) )
51 #set ( $childs = $pages.get($page.uri).childs )
52 #set ( $sinkhole = $page.put("childs", $childs) )
54 <!-- OVERWRITING PAGE - uri: $page.uri, path: $crumbs, name: "$page.name", childs: $page.childs -->
57 <!-- NEW PAGE --------- uri: $page.uri, path: $crumbs, name: "$page.name", childs: $page.childs -->
60 #set ( $sinkhole = $pages.put($page.uri, $page) )
64 <!-- DONE WITH MENUE ---- #if($page.name)$page.name-->#else(no name)-->
65 #set( $siteTitle = $menu.title )
66 #set( $siteAlt = $menu.alt )
67 #set( $siteImg = $menu.img )
75 #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
76 #set ( $sinkhole = $page.put("uri", $alignedFileName) )
77 #set ( $sinkhole = $page.put("name", "About") )
78 #set ( $sinkhole = $stack.push($page) )
79 #foreach ( $menu in $decoration.body.menus )
80 ## Nur benannte Menüs werden berücksichtigt
85 #foreach ( $menu in $decoration.body.menus )
86 ## Nur unbenannte Menüs werden berücksichtigt
92 ## Custom Variablen einlesen
93 #set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
95 #set ( $sitePath = "" )
97 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
99 <!-- title: $title -->
100 <!-- short title: $shortTitle -->
101 <!-- current: $alignedFileName -->
102 <!-- path: $sitePath -->
103 <!-- crumbs: $siteCrumbs -->
104 <!-- pages: $pages -->
107 xmlns="http://www.w3.org/1999/xhtml"
108 xmlns:layout="http://www.thymeleaf.org"
109 layout:decorator="templates/layout"
110 th:with="uri='$sitePath$alignedFileName'"
113 <title>juplo - $title</title>
114 <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
115 <link rel="canonical" href="$sitePath$alignedFileName"/>
118 <article class="main" layout:fragment="maincontent" juplo:variables='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"$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),"siet_img":"$siteImg"#end}'>
119 <header><h1>$shortTitle</h1></header>