navigation icon indicating copy to clipboard operation
navigation copied to clipboard

Possibility to add a structure as a child

Open bartrylant opened this issue 10 months ago • 1 comments

What are you trying to do?

This is probably something not so many people want, but I have this situation with a lot of clients. They want to be able to custom make a navigation menu, but for some parents, the children should reflect the structure of a structure section.

What they do now: they make a parent and manually add all the entries from the structure as children. When they make a new item in that structure, they forget they still have to add it to the navigation manually.

What's your proposed solution?

It would be cool is there would be a "dynamic" option of something like that, to add to a navigation. So:

parent 1
   child 1
   child 2
parent 2
   children = structure from section "xyz"
parent 3

I could off course code this myself (if a node id in a nav == a certain value, include a structure list), but it would be nice if I could do it all in the Navigation plugin.

Additional context

No response

bartrylant avatar Jan 24 '25 15:01 bartrylant

Yeah, I understand the reasoning with this sort of request, it's pretty common.

Navigation by nature does require you to often "double up" the work when adding items to a navigation. You've got to add the entry itself, then add it to navigation. This is both a blessing and a curse, but depends entirely on what you use Navigation for. Sometimes you'd want the entry to automatically be added, others you certainly wouldn't.

I think this'll come down to creating a new node type to pick a section, and that node type just iterates through the entries in that section as-is. This means you have zero access to modifying the titles of entries, or adding extra stuff like attributes, classes, etc. But that'll be the price to pay for something that's dynamic.

Certainly can build that now, or as you say through a custom-built navigation render.

engram-design avatar Jan 25 '25 04:01 engram-design