Closed DanielPantle closed 9 months ago
Compound slugs are already possible.
Using the example given it would look something like this
module.exports = ({ env }) => ({
// ...
slugify: {
enabled: true,
config: {
contentTypes: {
event: {
field: 'slug',
references: ['date','title'],
},
},
},
},
// ...
});
@ComfortablyCoding thanks for clarifying, thats great! I created a PR to include a note in the README that this is possible, see https://github.com/ComfortablyCoding/strapi-plugin-slugify/pull/123.
Hi,
I would like to use this plugin, but I need slugs generated out of multiple fields.
Use case: I have events where the date and the title of an event need to be part of the slug (because the same title can occur multiple times). Therefore the fields
date
(of type date) andtitle
(of type string) need to be combined.Example: for an event with title "Test Training" and date "2024-06-01" the following slug should be generated:
2024-06-01-test-training