0
votes

new to eleventy, I'm trying to create a collection index page based on a tag defined in the parent (front matter)

For example, a City:

---
name: New York
tags: ['cities']
restaurant_tag: USNYNY
---

And a restaurant in NYC:

---
name: Awesome Reststaurant
tags: ['USNYNY', 'italian', 'etc']
---

How would I create this? I get no results from the "obvious (to me)" query

{% for restaurant in collections.restaurant_tag %}

Thanks!

1

1 Answers

0
votes

Looks like you want to create custom collection, try to filter all items with addCollection