speedtech-website/layouts/partials/widgets/categoriesspot.html

20 lines
599 B
HTML
Raw Permalink Normal View History

2024-10-04 11:58:15 +02:00
{{ if isset .Site.Taxonomies "categoriesspot" }}
{{ if not (eq (len .Site.Taxonomies.categoriesspot) 0) }}
<h3>
{{ $current_path := .RelPermalink}}
{{ range $name, $items := .Site.Taxonomies.categoriesspot }}
{{ $pagepath := $name | urlize | lower | printf "%s%s" "/categoriesspot/"}}
{{ $p := $.Site.GetPage $pagepath}}
{{ $path := $p.RelPermalink }}
{{ if eq $current_path $path }}
{{ $p.Title }}
{{ else }}
<a href="{{ $path }}">{{ $p.Title }}</a>
{{ end }}
{{ end }}
</h3>
{{ end }}
{{ end }}