1

I’ve already got a ton of content put in by the client, and there’s quite a bit of accented characters (é, à, ...) in the titles, and thus also in the slugs where they get url encoded, which my client considers 'ugly'.

Now I’ve added the limitAutoSlugsToAscii' => true rule to the config, but how can I best rework the url’s for the already existing content? There’s about 1000 entries already in the website so I’d rather not go over them by hand.

Can I just clear the slug column in the database? Or will I have to write a temporary custom controller action that I can trigger to loop over all entries to redo their slug? Or is there another (better) solution?

1 Answer 1

3

Or will I have to write a temporary custom controller action that I can trigger to loop over all entries to redo their slug?

This one.

The plugin could then just use StringHelper::asciiString($slug); to do the ASCII conversion and re-save it back to the database.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.