Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Nesting collections

Started by Muut Archive 10 years ago · 5 replies · 515 views
10 years ago

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!

10 years ago

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.

10 years ago

could you provide some code as an idea ? Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1361 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1123 9 years ago