Hi,
how can I control which collections are available to be browsed when users want to add an internal link in a richText field?
So something like
{
type: 'relationship',
name: 'internal',
label: 'Document to link to',
relationTo: ['pages', 'posts'],
}
... for the richText field. Sorry, maybe I'm missing something but I couldn't find anything in the docs nor in this forum.
As you can see here in the first screenshot I can't select anything from the Posts collection.
But as shown in the second screenshot I could add items to the Posts collection.
Alright, I've got it: It has to do with the order of the collections in payload.config.ts
In the first example from within the pages collection richText fields can only link to Media, MediaCategories and Pages
In this example from within the pages collection richText fields can link to Media, MediaCategories, Pages, Posts and PostsCategories
If this behaviour is intended I think it should be described in the docs.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.