Supressed duplicate entries in breadcrumbs
authorKai Moritz <kai@juplo.de>
Mon, 6 May 2019 20:24:23 +0000 (22:24 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 22 Nov 2020 18:20:00 +0000 (19:20 +0100)
src/main/resources/META-INF/maven/site.vm

index cabe610..bb81305 100644 (file)
                 $siteCrumbs
                 #set($csep = ",")
               #end
+              #set($last = "")
               #foreach($crumb in $page.crumbs)
-                $csep
-                &quot;$sitePath$crumb.uri&quot;
-                #set($csep = ",")
+                #if($sitePath+$crumb.uri != $last)
+                  $csep
+                  &quot;$sitePath$crumb.uri&quot;
+                  #set($csep = ",")
+                  #set($last = $sitePath+$crumb.uri)
+                #end
               #end
             ]
             #set($sep = ",")