X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=blobdiff_plain;f=src%2Fsite%2Ftemplate.vm;h=7afc95855d5d9bebc354a1c31772696b30c406fd;hp=b441f0283f33cbf4d532970a4765c37bdc31ab37;hb=f4e7facbdd99a957d892e2e4b64ca06ec9974114;hpb=12cccfa5d5ae21be22c9f652cdb13439054bd11c diff --git a/src/site/template.vm b/src/site/template.vm index b441f02..7afc958 100644 --- a/src/site/template.vm +++ b/src/site/template.vm @@ -19,6 +19,16 @@ #set ( $sinkhole = $page.put("childs", $project.getClass().forName('java.util.LinkedHashMap').newInstance()) ) #set ( $sinkhole = $stack.push( $page ) ) + #if ($menu.title) + #set( $sinkhole = $page.put("title", $menu.title) ) + #end + #if ($menu.alt) + #set( $sinkhole = $page.put("alt", $menu.alt) ) + #end + #if ($menu.img) + #set( $sinkhole = $page.put("img", $menu.img) ) + #end + #foreach ( $item in $menu.items ) #buildPages ( $item ) #end @@ -44,19 +54,28 @@ #else - + #end #set ( $sinkhole = $pages.put($page.uri, $page) ) #else - + #else(no name)--> + #set( $siteTitle = $menu.title ) + #set( $siteAlt = $menu.alt ) + #set( $siteImg = $menu.img ) + #end + #end #end ## 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 = $stack.push($page) ) #foreach ( $menu in $decoration.body.menus ) ## Nur benannte Menüs werden berücksichtigt #if ($menu.name) @@ -70,10 +89,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() ) + + @@ -81,17 +108,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

+

+

+