Hi there,
I’m making some tweaks to my custom theme, and have hit a bit of a block. I’m hoping to add the most popular tags per series in my series/terms.html layout page.
I have the list of pages per series (i.e. $value.Pages), but I’m trying to think the best way to get the aggregated count of tags per series, so that I can display the most popular tags per series in the below page.
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $page := $.Site.GetPage (printf "/%s/%s" $type .Name) }}
<div class="row mt-4">
<div class="col-md-3">
<a href="{{ $page.Permalink }}"><img src="{{ $page.Params.image | absURL }}" class="rounded-circle z-depth-2 align-middle" width="100" title="{{ $page.Title }}" alt="{{ $page.Title }}" /></a>
</div>
<div class="col-md-9">
<h2><a href="{{ $page.Permalink }}">{{ $page.Title }} <small>({{.Count}})</small></h2></a>
<p>{{ $page.Description }}</p>
</div>
</div>
{{ end }}
I’ve tried using $value.Pages.Params.Tags or $value.Pages.Taxonomies.Tags, neither of which exist as a concept. I’ve also tried the intersect of .Site.Taxonomies.Tags with the $value.Pages, and cannot quite get it to work.
Is there something obvious that I may have overlooked here?
Thanks!