X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=blobdiff_plain;f=src%2Fsite%2Ftemplate.vm;h=05116fa99f6814d716b8aac3841e6bcfbacd0d99;hp=6a5b765560895b8397826169e336de45286f2d0c;hb=f0e9b3b0c6087e850749003de40c071833a3c2c2;hpb=52bcfa23d17b56430c61d14645e804eef7eb8140 diff --git a/src/site/template.vm b/src/site/template.vm index 6a5b765..05116fa 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 ) @@ -73,8 +77,8 @@ ## Seiten einlesen #set ( $page = $project.getClass().forName('java.util.LinkedHashMap').newInstance() ) -#set ( $sinkhole = $page.put("uri", $alignedFileName) ) -#set ( $sinkhole = $page.put("name", "About") ) +#set ( $sinkhole = $page.put("uri", "index.html") ) +#set ( $sinkhole = $page.put("name", "$project.name") ) #set ( $sinkhole = $stack.push($page) ) #foreach ( $menu in $decoration.body.menus ) ## Nur benannte Menüs werden berücksichtigt @@ -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

+

+

+