Open 87Development opened 1 year ago
So long as I understand correctly, this isn't something that's possible or going to be incorporated. Navigation doesn't define the URL or slug of element nodes, that's defined by the element. This is so that your Navigation can define a structure that's independent of the elements you pick.
So you might have your entries in a structure with parent/child relationships (which affect the uri
of the entries), but this is different to the structure in the navigation.
In your example, with jeans
as the slug, if there's no parent entry relationship to our-clothes
, then the uri
of the entry won't reflect that, no matter how you set your hierarchy in Navigation. This is also because element nodes use the uri
of the linked-to element, rather than the hierarchy. So you could need to have "Our Clothes" as a parent entry to "Jeans" to get the structure you are after.
Hope that makes sense?
Question
It is possible to create slugs based on the hierachy? For example I have a hierachy that looks like this,
My current graphql preview implmentation just returns the url/uri/slug of the entry and not it's parent or hierachy?
Basically what I am wanting it a node to have a href of it's entries slug and it's parent's slug if it indeed has a parent. Is this possible?
Additional context
No response