Рет қаралды 11,450
In this video, we discuss how you can replace the Strapi findOne controller action to accept a slug instead of an id. This allows your url path slug to dictate which content is returned from Strapi and is useful when creating blogs with Strapi. This allows you to have user-friendly urls instead of having id’s in the url.
Chapters:
0:00:09 - Setting up a POST in the CMS
0:01:19 - Overriding the findOne Route
0:02:55 - Overriding the findOne Controller
0:05:45 - Testing Our Slug
Learn more with Brayden Girard - / braydengirard
---
Get started with Strapi: strapi.io/
Try live demo: strapi.io/demo
Strapi Blog: strapi.io/blog
Find help in our Forum: forum.strapi.io/
We are hiring! strapi.io/careers