From: Kai Moritz Date: Fri, 8 Jul 2016 09:23:26 +0000 (+0200) Subject: Relative URI's and breadcrumb-paths can be converted into absolute ones X-Git-Tag: maven-thymeleaf-skin-1.0.0~18 X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=commitdiff_plain;h=b1aa2a4a83055ff2fcaf2ceeac47a1b32d9e55fc Relative URI's and breadcrumb-paths can be converted into absolute ones Defined custom variables custom.path and custom.crumbs in site.xml, that can be used to convert the relative URI's and breadcrumb-paths into absolute ones. --- diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index 6a5b765..01e16bf 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.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
diff --git a/src/site/site.xml b/src/site/site.xml index d2c542c..4ac76eb 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -21,4 +21,10 @@ + + + /maven-thymeleaf-skin/ + {"uri":"/projects.html","name":"Projects"},{"uri":"/maven-thymeleaf-skin/index.html","name":"Apache-Maven Thymeleaf-Skin"} + +