From 35bfd11f314f8f4c21ce472ee3159d3ee9c66249 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jul 2016 10:58:01 +0200 Subject: [PATCH] Read in extra-info from site.xml The attributes "title", "alt" and "img" for the tags and of the site.xml are read in. For -tags, these entries are made available in the page-definition. For the manually defined menu (the one without a name!), as top-level variables "site_title", "site_alt" and "site_img". --- src/main/resources/META-INF/maven/site.vm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index 27ecbdf..6a5b765 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.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 @@ -51,7 +61,12 @@ #else - + #else(no name)--> + #set( $siteTitle = $menu.title ) + #set( $siteAlt = $menu.alt ) + #set( $siteImg = $menu.img ) + #end + #end #end @@ -93,7 +108,7 @@ -
+

$shortTitle

$bodyContent
-- 2.20.1