From: Kai Moritz Date: Sat, 16 Jul 2016 20:02:42 +0000 (+0200) Subject: Fixed problems with the page-title X-Git-Tag: maven-thymeleaf-skin-1.0.0~3 X-Git-Url: https://juplo.de/gitweb/?p=maven-thymeleaf-skin;a=commitdiff_plain;h=b4577ed4f3ffde6a7fcb2f77f8b3a7efbfe6a765 Fixed problems with the page-title The -tag of the page is taken from the velocity-variable tile, if the variable shortTitle is set. For XHTML-templates, this is the case, if the <title>-tag on the input-xhtml is set. If the variable is not set, the page-title is constructed from the project-name and the name of the page, that was found in the menu-data. A leading head in the content is not generated automatically, because the pages, that are generated automatically by maven differ to much. Hence, the leading head in the content must be specified by hand in the content. --- diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index a6055e5..86006d7 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -102,6 +102,7 @@ #end #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() ) +<!-- name: $pages.get($alignedFileName).name --> <!-- title: $title --> <!-- short title: $shortTitle --> <!-- current page: $alignedFileName --> @@ -121,7 +122,7 @@ " > <head> - <title>juplo - $title + #if($shortTitle and $shortTitle != '')$title#else$project.name — $pages.get($alignedFileName).name#end @@ -134,7 +135,6 @@


-

$shortTitle

$bodyContent