#end
#set ( $sinkhole = $pages.put($page.uri, $page) )
- #set ( $sinkhole = $page.remove("uri") )
#else
#end
#end
-<!-- $pages -->
-
-
-
-#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
-#macro ( searchBreadcrumbTrail $items )
- #set ( $sep = '' )
- #foreach ( $item in $items )
- #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
- #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
- #if ( $currentItemHref == 'index.html' )
- #set ( $name = $project.name )
- #else
- #set ( $name = $item.name )
- #end
- $sep"$currentItemHref": {
- "name": "$name"
- #if ( !$item.items.empty )
- ,"childs": {
- #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) )
- #searchBreadcrumbTrail ( $item.items )
- #set ( $sinkhole = $crumbs.pop() )
- }
- #end
- #if ( !$breadcrumbs && $alignedFileName == $currentItemHref )
- #set ( $breadcrumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
- ## Den Titel der Seite korrigieren!
- #set ( $title = "$project.name - $item.name" )
- #set ( $shortTitle = $name )
- #set ( $sinkhole = $breadcrumbs.put( 'index.html', $project.name) )
- #set ( $sepc = '' )
- #foreach ( $crumb in $crumbs.entrySet() )
- #set ( $sinkhole = $breadcrumbs.put( $crumb.key , $crumb.value ) )
- $sepc{ "uri": "$crumb.key", "name": "$crumb.value" }
- #set( $sepc = ',' )
- #end
- #set ( $sinkhole = $breadcrumbs.put( $alignedFileName , $shortTitle) )
- ]
- #end
- }
- #set ( $sep =',' )
- #end
-#end
<!-- title: $title -->
<!-- short: $shortTitle -->
<link rel="canonical" href="$project.url/$alignedFileName"/>
</head>
<body>
- <article class="main" layout:fragment="maincontent" juplo:variables='merge:{
-## Datenstrukturen für die Navigation vorbereiten
-#foreach ( $menu in $decoration.body.menus )
- ## Nur unbenannte Menüs werden berücksichtigt
- #if (!($menu.name))
- ## Breadcrumb-Pfad suchen
- "pages": {
- #searchBreadcrumbTrail ( $menu.items )
- }
- #end
-#end
-}'>
+ <article class="main" layout:fragment="maincontent" juplo:variables='merge:{"pages":{#set($sep = "")#foreach($page in $pages)$sep"$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 = "")#foreach($crumb in $page.crumbs)$csep{"uri":"$crumb.uri","name":"$crumb.name"}#set($csep = ",")#end]}#set($sep = ",")#end}}'>
<header><h1>$shortTitle</h1></header>
$bodyContent
</article>