From 076096e96c73befa796ccf8c3c1c983a23eb40eb Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jul 2016 10:10:23 +0200 Subject: [PATCH] Projekt-Seite erstellt: Velocity-Template - JSON aus Daten gerendert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das JSON wird jetzt aus den eingelesenen und zusammengeführten Menüdaten gerendert. Das alte Bradcrumb-Macro wurde entfernt. --- src/site/template.vm | 59 +++----------------------------------------- 1 file changed, 3 insertions(+), 56 deletions(-) diff --git a/src/site/template.vm b/src/site/template.vm index 2577a89..b441f02 100644 --- a/src/site/template.vm +++ b/src/site/template.vm @@ -48,7 +48,6 @@ #end #set ( $sinkhole = $pages.put($page.uri, $page) ) - #set ( $sinkhole = $page.remove("uri") ) #else @@ -71,53 +70,12 @@ #end #end - - - - -#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() ) -#macro ( searchBreadcrumbTrail $items ) - #set ( $sep = '' ) - #foreach ( $item in $items ) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - #if ( $currentItemHref == 'index.html' ) - #set ( $name = $project.name ) - #else - #set ( $name = $item.name ) - #end - $sep"$currentItemHref": { - "name": "$name" - #if ( !$item.items.empty ) - ,"childs": { - #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) ) - #searchBreadcrumbTrail ( $item.items ) - #set ( $sinkhole = $crumbs.pop() ) - } - #end - #if ( !$breadcrumbs && $alignedFileName == $currentItemHref ) - #set ( $breadcrumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() ) - ## Den Titel der Seite korrigieren! - #set ( $title = "$project.name - $item.name" ) - #set ( $shortTitle = $name ) - #set ( $sinkhole = $breadcrumbs.put( 'index.html', $project.name) ) - #set ( $sepc = '' ) - #foreach ( $crumb in $crumbs.entrySet() ) - #set ( $sinkhole = $breadcrumbs.put( $crumb.key , $crumb.value ) ) - $sepc{ "uri": "$crumb.key", "name": "$crumb.value" } - #set( $sepc = ',' ) - #end - #set ( $sinkhole = $breadcrumbs.put( $alignedFileName , $shortTitle) ) - ] - #end - } - #set ( $sep =',' ) - #end -#end + + -
+

$shortTitle

$bodyContent
-- 2.20.1