taxonomies.html 610 B

123456789101112131415
  1. {{ $context := .context }}
  2. {{ $taxo := .taxo }}
  3. {{ $title := .title }}
  4. {{ $class:= "" }}
  5. {{ if isset $context.Site.Taxonomies ( lower $taxo ) }}
  6. {{ $taxonomy := index $context.Site.Taxonomies ( lower $taxo ) }}
  7. {{ if (gt (len $taxonomy) 0)}}
  8. {{ range $taxonomy }}
  9. {{if eq $context.Title .Page.Title}}
  10. {{ $class = "active" }}
  11. {{end}}
  12. <li><a class="taxonomy-term {{ $class }}" href="{{ .Page.Permalink }}" data-taxonomy-term="{{ urlize .Page.Title }}"><span class="taxonomy-label">{{ .Page.Title }}</span></a></li>
  13. {{ end }}
  14. {{ end }}
  15. {{ end }}