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: tmp1~11
X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=076096e96c73befa796ccf8c3c1c983a23eb40eb;p=maven-thymeleaf-skin
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 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
+
+
-
+
$bodyContent