Edit Slug / Child Pages

Hello,

Think I may be misunderstanding slugs here, but Iā€™d like a way to create child pages and edit the slug to represent that.

For exampleā€¦

  • Cars (/cars)
    ā€“ Audi (/cars/audi)

It doesnā€™t seem possible to edit the slug to do this, so Iā€™m thinking thereā€™s likely a different approach to doing it?

Any help or advice would be great, thanks!

1 Like

For some more information, I am using Gatsby to pull this through, referencing the slug and using createPages.

I presume Gatsby would handle the slug as above instead?

OK - solution found is to create a new field in the model (ā€œIs child page?ā€) - if this is checked, it will discover the parent slug, add that in and build the full slug.

This was my first experience when using the slug field and tree collections. I expected the slug to represent the tree structure. At least I expected I was able to manually edit the slugs, but you are not allowed to add ā€œ/ā€ in them.

I have added a feature request for this. If you a are not satisfied with you workaround please upvote :slight_smile: Slug should represent structure in tree collections

1 Like

hello @Zellement and welcome! :slight_smile:

I think the answer to this conversation: Slug should represent structure in tree collections - #2 by mat_jack1 would be useful for you too.

Let me know if you still have doubts!