Closed zomars closed 5 years ago
Short answer: no.
If you need the slug, you can read it from ['attributes']['slug']
.
So you can do your own routing in frontend for whatever you need.
Calling /json/{contenttype}/{slug}
will still work with this extension.
But calling by id
is usually better, since the slug
can change easier than the id
.
I see. In my use case I'm doing a previous/next pagination using the links
property, so I don't have the slug of the previous/next record at that time. I only have the slug for the current record. IDK if I'm explaining myself correctly.
Yeah, I think that's outside the scope of this extension.
slug
and set the value in the address bar.So something like pushState
, see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries
But if you're already using a framework, there might be something else available (usually this is coupled with routing).
This instead of the actual
/contenttype/id
?Thanks in advance 🙏