#end
## Custom Variablen einlesen
-#set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
-#if ( !$sitePath )
- #set ( $sitePath = "" )
+#set ( $canonicalPath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() )
+#if ( !$canonicalPath )
+ #set ( $canonicalPath = "" )
#end
+#set ( $sitePath = $canonicalPath + $project.version + "/" )
#set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
<!-- name: $pages.get($alignedFileName).name -->
th:replace="~{/templates/layout.html :: layout(
uri='$sitePath$alignedFileName',
json='MERGE:
-{
- "_names":{#set($sep = "")#foreach($page in $pages)$sep"$sitePath$page.uri":"$page.name"#set($sep = ",")#end},
- "_childs":{#set($sep = "")#foreach($page in $pages)
- #if(!$page.childs.isEmpty())$sep"$sitePath$page.uri":[#set($csep = "")#foreach($child in $page.childs.entrySet())
- $csep"$sitePath$child.key"#set($csep = ",")
- #end]#set($sep = ",")
- #end
- #end},
- "_crumbs":{#set($sep = "")#foreach($page in $pages)
- $sep"$sitePath$page.uri":[#set($csep = "")
- #if($siteCrumbs)$siteCrumbs#set($csep = ",")#end
- #foreach($crumb in $page.crumbs)
- $csep"$sitePath$crumb.uri"#set($csep = ",")
- #end]#set($sep = ",")
- #end}
-}
+ {
+ "_names": {
+ #set($sep = "")
+ #foreach($page in $pages)
+ $sep
+ "$sitePath$page.uri": "$page.name"
+ #set($sep = ",")
+ #end
+ },
+ "_childs": {
+ #set($sep = "")
+ #foreach($page in $pages)
+ #if(!$page.childs.isEmpty())
+ $sep
+ "$sitePath$page.uri": [
+ #set($csep = "")
+ #foreach($child in $page.childs.entrySet())
+ $csep
+ "$sitePath$child.key"
+ #set($csep = ",")
+ #end
+ ]
+ #set($sep = ",")
+ #end
+ #end
+ },
+ "_crumbs": {
+ #set($sep = "")
+ #foreach($page in $pages)
+ $sep
+ "$sitePath$page.uri": [
+ #set($csep = "")
+ #if($siteCrumbs)
+ $siteCrumbs
+ #set($csep = ",")
+ #end
+ #set($last = "")
+ #foreach($crumb in $page.crumbs)
+ #if($sitePath+$crumb.uri != $last)
+ $csep
+ "$sitePath$crumb.uri"
+ #set($csep = ",")
+ #set($last = $sitePath+$crumb.uri)
+ #end
+ #end
+ ]
+ #set($sep = ",")
+ #end
+ }
+ }
')}"
>
<head>
<title id="title">#if($shortTitle and $shortTitle != '')$title#else$project.name — $pages.get($alignedFileName).name#end</title>
<meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
- <link rel="canonical" href="$sitePath$alignedFileName"/>
+ <link id="canonical" rel="canonical" href="$canonicalPath$alignedFileName"/>
</head>
<body>
<h2>Path</h2>