Projekt-Seite erstellt: Velocity-Template - Links zum Browsen eingebaut
authorKai Moritz <kai@juplo.de>
Fri, 8 Jul 2016 09:45:42 +0000 (11:45 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 11 Jul 2016 14:39:04 +0000 (16:39 +0200)
src/site/template.vm

index f15ae5b..f80a95c 100644 (file)
     <link rel="canonical" href="$sitePath$alignedFileName"/>
   </head>
   <body>
+    <h2>Path</h2>
+    <p>
+      <ol>
+        #foreach($crumb in $pages.get($alignedFileName).crumbs)<li><a href="$crumb.uri">$crumb.name</a></li>#end
+      </ol>
+    </p>
+    <hr />
     <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"$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}'>
       <header><h1>$shortTitle</h1></header>
       $bodyContent
     </article>
+    <hr />
+    <h2>Pages</h2>
+    <p>
+      <ul>
+        #foreach($page in $pages)<li><a href="$page.uri">$page.name</a></li>#end
+      </ul>
+    </p>
   </body>
 </html>