Forum
Blog Post Slug
Hi Guys,
Is it possible to change the field that generates the Blog Slug? I want to have a custom field in the CMS that is used to create custom urls for each blog,
I've tried a few different ways of doing this from what I can find in the docs but not had any luck getting it to work.
Cheers
Chris
The slug generation is hardwired for the blog, as it's a crucial field.
You should be able to ignore it and use your own field for that purpose though.
I have added this to my blog
Then in the settings set my blog post path to "/blog/{postSlugCustom}" and slug format to "{postURLCustom}" (I've tried various combinations of the fields on the settings). The blog isn't picking anything up in the URL however It's just empty url like this "/blog/ "
I guess I'm doing something wrong but can't figure out what.
Thanks
In your page, are you then filtering based on that field? If not it'll be matching it against
postSlug
which will obviously fail.No i'm not as not sure what you mean by filtering?
In my post_summary file I've changed the a tag to use the custom slug
What code do you have on your page for displaying a post? It should be something like: