my file tree looks something like this:
TXT
pages
journeys
journey
day
journeys:
YAML
content:
items: @self.children
journey:
YAML
content:
items: @self.children
how can I address nested collections in code?
thank you!
my file tree looks something like this:
pages
journeys
journey
day
journeys:
content:
items: @self.children
journey:
content:
items: @self.children
how can I address nested collections in code?
thank you!
I think the best option is to use taxonomy for your collection rather than @self.children so that way you will have much more control.
could you provide some code as an idea ? Thanks!
You assign a taxonomy to the pages (a tag or a category), and you ask Grav to build a collection from such taxonomy, like explained in Taxonomy Collections
code? ;-)
or: what fits where?
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1361 | 9 years ago | ||
| 2 | 939 | 9 years ago | ||
| 2 | 4069 | 9 years ago | ||
| 1 | 2958 | 9 years ago | ||
| 3 | 1123 | 9 years ago |