Hi there!
I’m trying to list the members of a taxonomy in a shortcode without any success; I’ve taken a look at previous posts (like this ) but I don’t really understand the solution. (also, I didn’t revive the old conversation because it may notify many people).
I’d like to add something like this:
{{< tripsummary tripName="madeira-2019" >}}
in my content/post/xxx.md
I’ve created a shortcode tripsummary.html
with:
{{ $tripName := .Get "tripName" }}
<section class="tripsummary">
{{ range where $tripName "in" ".site.Params.trips" }}
{{ .Render "title" }}
{{ end }}
</section>
the problem is the where
clausule
This “trips” taxonomy goes in the frontmatter of every post I want to relate to a trip, like:
---
author: yamila
date: 2019-02-19T08:00:00.000Z
slug: madeira-2019-funchal-y-curral-das-freiras
title: Madeira 2019 - Funchal y Curral das Freiras
thumbnailImage: https://farm8.staticflickr.com/7849/46264969955_ce3ed8795b_z.jpg
coverImage: https://farm8.staticflickr.com/7849/46264969955_ce3ed8795b_b.jpg
tags:
- Madeira
trips:
- Madeira 2019
---
any hint would be appreciated! Thanks for your time