From: Kai Moritz Date: Fri, 8 Jul 2016 08:10:23 +0000 (+0200) Subject: Projekt-Seite erstellt: Velocity-Template - JSON aus Daten gerendert X-Git-Tag: simple-mapper-1.0.0~21 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=5ffa9328e2840ca843aad35142fc39692f737261;p=simple-mapper Projekt-Seite erstellt: Velocity-Template - JSON aus Daten gerendert Das JSON wird jetzt aus den eingelesenen und zusammengeführten Menüdaten gerendert. Das alte Bradcrumb-Macro wurde entfernt. --- diff --git a/src/site/template.vm b/src/site/template.vm index dc24209..02ae2b4 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,49 +70,6 @@ #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 @@ -131,18 +87,7 @@ -
+

$shortTitle

$bodyContent