Collection: Iterate over children #4452
-
Historically I always had all content related to a website hierarchically stored in one database and iterated over child sections to populate my navigation structure. I know I can do that by creating seperate collections an/or nav's but I like to continue the old way when possible (My customers are used to this approach). I really like the possibility to use collections directly in navigation structures. Is it possible to iterate over child sections in the following example? I want to iterate over 'Main menu' for the Navbar en over Footer menu for the Footer navigation. In this example footer Menu has two columns with each 2 links. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Collection trees are designed to organize the URL structure. You can only position an entry in there one time. In this screenshot, you've created Short answer is no, you can't just have all your content together in one big blob. Perhaps you could create a nav and then use collection tags inside it to loop over appropriate entries. |
Beta Was this translation helpful? Give feedback.
Collection trees are designed to organize the URL structure. You can only position an entry in there one time.
In this screenshot, you've created
Main menu
andFooter menu
entries. I doubt you actually want those.Short answer is no, you can't just have all your content together in one big blob.
Perhaps you could create a nav and then use collection tags inside it to loop over appropriate entries.