From: Kai Moritz Date: Fri, 8 Jul 2016 09:23:26 +0000 (+0200) Subject: Projekt-Seite erstellt: Velocity-Template - site-path und crumbs von Config X-Git-Tag: tmp2~8 X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=commitdiff_plain;h=317eebf0e26c6bf835459de5464c68b337070eb0 Projekt-Seite erstellt: Velocity-Template - site-path und crumbs von Config Die URI-Pfade und der generierte Breadrumb-Path werden durch Informationen aus der Konfigurationsdatei src/site/site.xml ergänzt. --- diff --git a/src/site/site.xml b/src/site/site.xml index 02fc7c8..ce59948 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -9,4 +9,10 @@ + + + /simple-mapper/ + {"uri":"/projects.html","name":"Projects"},{"uri":"/simple-mapper/index.html","name":"Simple Mapper 4 JSON"} + + diff --git a/src/site/template.vm b/src/site/template.vm index 6a5b765..01e16bf 100644 --- a/src/site/template.vm +++ b/src/site/template.vm @@ -89,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() ) + + @@ -100,15 +108,15 @@ 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 - + -
+

$shortTitle

$bodyContent