Slugs & Multi level URLs

We have a client that wants multi-level URLs (3 deep) on their website. To achieve this we created a SLUG field and updated the LinkResolver so that slugs work effectively.
However, when it comes to RichText fields there is a problem. The link data in those fields only ever returns...

"data": {
  "id": "X3oe9xEAACIAZceQ",
  "type": "page",
  "tags": [], 
  "slug": "my-page",
  "lang": "en-gb",
  "uid": "my-page",
  "link_type": "Document",
  "isBroken": false
}

(Note, slug here seems to be the depreciated slug that Prismic used to use) So my question is, has anyone resolved this issue in React?

Or how does Prismic suggest we handle multi-level URLS effectively?

Hi Team,

I'll try and help with this.

If this is a case that you are receiving the correct data in the linkresolver, but not in the rich text fields then maybe the link resolver isn't being passed correctly in your htmlserializer. Can you check how your links are handled there?

Alternatively if your URL's go no deeper than:

/grandparent/parent/uid

You can create a Slice Machine/ Nuxt project and create nested routes that way.

Let me know what you think.

Thanks.

Alas, I can't use slice machine on this project, as part of it already React Based.

The Link resolver works fine when using Link Resolver standalone on buttons components etc. Its when I come to use this on links inside RichText. I ONLY receive the _meta info back from prismic

we are using - https://github.com/prismicio/prismic-reactjs for rich text elements

OK, I see.

Have you checked out the section about custom links?:

This issue has been closed due to inactivity. Flag to reopen.