From 646bf36621c27f4c87a8afbf1a4ffa3091b34a37 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jul 2016 09:02:07 +0200 Subject: [PATCH] Projekt-Seite erstellt: Velocity-Template - Seitendaten korrekt eingebunden --- src/site/template.vm | 58 +++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/src/site/template.vm b/src/site/template.vm index ac87689..decfec8 100644 --- a/src/site/template.vm +++ b/src/site/template.vm @@ -33,57 +33,38 @@ #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 - $sep"$currentItemHref": { - "name": "$name" - #if ( !$item.items.empty ) - ,"childs": { - #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) ) - #searchBreadcrumbTrail ( $item.items ) - #set ( $sinkhole = $crumbs.pop() ) - } - #end } #set ( $sep =',' ) #end #end -## Datenstrukturen für die Navigation vorbereiten -#foreach ( $menu in $decoration.body.menus ) - ## Nur unbenannte Menüs werden berücksichtigt - #if (!($menu.name)) - ## Breadcrumb-Pfad suchen - "menu": { - #searchBreadcrumbTrail ( $menu.items ) - } - #end -#end - - - - -
+

$shortTitle

$bodyContent
-- 2.20.1