Hey everyone 👋,
I've been using the nested docs plugin with Payload CMS and it's left me with some questions about data structure. I have two main collections:
collection resembles what we would typically see in WordPress. I've implemented nested docs on
but I'm unsure about how to lock down the slugs so that
can't create URLs that conflict with the
collection. For example, how can I prevent
from creating any URLs with
in the breadcrumbs?
On a related note, I've run into an issue when querying pages based on their breadcrumbs. I've tried querying like this:
, but it doesn't solve the issue when multiple pages match parts of the query. I've considered adding a hidden
field that saves the last index of the breadcrumbs array, and populating it using a
hook. Is this the right approach? Is there a way to ensure that this
doesn't collide with another collection's path before saving?
Thanks in advance for your help! 🙏
Did you ever figure out how you're going to handle these things? Going through some of the same thoughts myself right now.