Hello, I’m doing a docs system and I’m stuck on getting the children’s pages on a navbar. I’m trying to do it all under a single template so a ‘page(‘guide’)->children()’ is not what I’m looking into and wanna know if this could be achieved or am I just complicating my life here.
Here’s my page structure:
Docs-> (as main parent)
Guide/API/Wiki → (as primary pages)
Pages->Subpages (as children of primary pages)
The navbar should contain the children of any primary page that you are on even if you are on one of those primary pages
Maybe someone gets my idea and knows a workaround without using multiple templates or specifying the page to get the children
My logical way would be something like this but it gets all my children from all primary pages where I need just the page that I’m in, like if I’m on guide it would get me guide children (what I need is to check for an active state or something)
$page('docs')->children()->listed()