Hi all, new to Grav and loving it so far. According to the documentation you can access modular children of the current page as a collection with '@self.modular'. Is there a way to access modular children of another page in a similar way? eg. '@page.modular': '/fruit'? I'm aware of grav-plugin-page-inject, but it seems like we should be able to do it via page collections too? Cheers!
Archive
There's no built-in way now AFAIK, you can do '@page': '/fruit'and then {% set collection = page.collection().modular() %}in the Twig.
Ah excellent, that'll do the trick. Thanks a lot.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1369 | 9 years ago | ||
| 2 | 942 | 9 years ago | ||
| 2 | 4069 | 9 years ago | ||
| 1 | 2960 | 9 years ago | ||
| 3 | 1125 | 9 years ago |