{{- $query := first 1 (where (where .Context.Site.Pages "Kind" "taxonomy") "Type" .Params.type) -}} {{- $context := .Context -}} {{- $limit := default 10 .Params.limit -}} {{- $hideInTaxonomyPage := default true .Params.hideInTaxonomyPage -}} {{- if $query -}} {{- $taxonomyPage := index $query 0 -}} {{- $isTaxonomyPage := eq .Context $taxonomyPage -}} {{- if not (and $isTaxonomyPage $hideInTaxonomyPage) -}}
{{ partial "helper/icon" (default "tag" .Params.icon) }}

{{ default $taxonomyPage.Title .Params.title }}

{{ $pages := index $context.Site.Taxonomies .Params.type }} {{ $pagesSorted := $pages.ByCount }} {{ range first $limit $pagesSorted }} {{ .Page.Title }} {{ end }}
{{- end -}} {{- else -}} {{- warnf "Taxonomy [%s] not found." .Params.type -}} {{- end -}}