X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=blobdiff_plain;f=src%2Fsite%2Ftemplate.vm;h=fa2d040bbca85b2776f3cb66ff57d414e847fd68;hp=6a5b765560895b8397826169e336de45286f2d0c;hb=8d60439988f581df3e2265210518f758a8d965bc;hpb=52bcfa23d17b56430c61d14645e804eef7eb8140 diff --git a/src/site/template.vm b/src/site/template.vm index 6a5b765..fa2d040 100644 --- a/src/site/template.vm +++ b/src/site/template.vm @@ -37,6 +37,10 @@ #if ( $page.uri != "" ) #set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() ) + #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() ) + #set ( $sinkhole = $crumb.put("uri", $page.uri) ) + #set ( $sinkhole = $crumb.put("name", $page.name) ) + #set ( $sinkhole = $crumbs.push($crumb) ) #foreach ( $entry in $stack ) #if ( $entry.uri != "" ) #set ( $crumb = $project.getClass().forName('java.util.LinkedHashMap').newInstance() ) @@ -54,14 +58,14 @@ #else - + #end #set ( $sinkhole = $pages.put($page.uri, $page) ) #else - #else(no name)--> + #else(no name)--> #set( $siteTitle = $menu.title ) #set( $siteAlt = $menu.alt ) #set( $siteImg = $menu.img ) @@ -89,10 +93,18 @@ #end #end +## Custom Variablen einlesen +#set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() ) +#if ( !$sitePath ) + #set ( $sitePath = "" ) +#end +#set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() ) + + @@ -100,17 +112,31 @@ xmlns="http://www.w3.org/1999/xhtml" xmlns:layout="http://www.thymeleaf.org" layout:decorator="templates/layout" - th:with="uri='$alignedFileName'" + th:with="uri='$sitePath$alignedFileName'" > juplo - $title - + -
+

Path

+

+

    + #foreach($crumb in $pages.get($alignedFileName).crumbs)
  1. $crumb.name
  2. #end +
+

+
+

$shortTitle

$bodyContent
+
+

Pages

+

+

+