Projekt-Seite erstellt: Velocity-Template - in HTML Sichtbare Debug-Ausgabe
authorKai Moritz <kai@juplo.de>
Mon, 13 Mar 2017 17:00:40 +0000 (18:00 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 12 May 2017 21:54:39 +0000 (23:54 +0200)
src/site/template.vm

index 0bcbd44..d9fc9bb 100644 (file)
       $bodyContent
     </article>
     <hr />
+    <h2>Common</h2>
+    <ul>
+      <li><strong>Title</strong>: $title</li>
+      <li><strong>Short Title</strong>: $shortTitle</li>
+      <li><strong>Current</strong>: $alignedFileName</li>
+      <li><strong>Path</strong>: $sitePath</li>
+      <li><strong>Crumbs</strong>: $siteCrumbs</li>
+      <li><strong><code>title</code></strong>: $siteTitle</li>
+      <li><strong><code>alt</code></strong>: $siteAlt</li>
+      <li><strong><code>img</code></strong>: $siteImg</li>
+    </ul>
     <h2>Pages</h2>
-    <p>
-      <ul>
-        #foreach($page in $pages)<li><a href="$page.uri">$page.name</a></li>#end
-      </ul>
-    </p>
+    <ul>
+      #foreach($page in $pages)
+      <li>
+        <a href="$sitePath$page.uri" title="$page.title">
+          #if($page.img)
+            <img src="$page.img" alt="$page.alt"/>
+          #end
+          $page.name
+        </a>
+        #if($page.title)
+          <code>title</code>=$page.title
+        #end
+        #if($page.img)
+          <code>img</code>=$page.img
+        #end
+        #if($page.alt)
+          <code>alt</code>=$page.alt
+        #end
+        #if(!$page.childs.isEmpty())
+        <br />
+        Childs:
+        <ol>
+          #foreach($child in $page.childs.entrySet())
+          <li><a href="$sitePath$child.key">$child.value</a></li>
+          #end
+        </ol>
+        #end
+      </li>
+      #end
+    </ul>
+    <h2>Crumbs</h2>
+    <ol>
+      #foreach($crumb in $page.crumbs)
+      <li><a href="$sitePath$crumb.uri">$crumb.name</a></li>
+      #end
+    </ol>
   </body>
 </html>