What would be the recommended model where I can use one custom type to create pages for /parent-path/slug or just /parent-path? eg /about, /community/about, /resources/tips
I could have created custom type for each parent-path and use UID for slug - but if all my pages going to use the same slices why do I trouble myself duplicate the same custom type?
I was thinking to just use Key Text field for Parent Path or even using tags as explained here linkResolver and nested paths - but there is a limitation with UID where it is only unique within a custom type which means I can't share one custom type for all pages.
If I understand your question correctly, you have asked for 2 topics:
Content modeling, why only 1 custom type is not sufficient to create all pages.
You want to use the same uid for multiple pages such as “aboutus” uid for /aboutus and /community/aboutus
Here are my answers:
The main idea behind defining multiple custom types for a site is to share the same structure and slices between the common types of pages. For example: if there is a blog site, you can have the same Blog custom type for all blogs, but for other pages such as blog listing or contacts, they will have different Custom Types.
The same UID's are not allowed to instances made from the same custom types, but of course, you can give the same UID's concerning different custom types.
I apologize for the inappropriate response from my side. Yes, It is possible to use Route Resolver from the Slice Machine to get its parent path. The only issue is that the Slice Machine is available only for Next.js and Nuxt.js frameworks. It doesn't come with React.js.
I can enable the Slice Machine to your repo if you are using any of those frameworks.
Thanks,
Priyanka
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
8
Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.