core icon indicating copy to clipboard operation
core copied to clipboard

use underscores in slugs

Open denis-gorin opened this issue 3 years ago • 4 comments

Hi, Is there any way to use underscores in slugs?

denis-gorin avatar Jun 07 '21 12:06 denis-gorin

No, symfony automatically generates them using dashes. What is the usecase for this?

bobdenotter avatar Jun 07 '21 12:06 bobdenotter

ok, I get it usecase - just client is using predefined adresses in QR codes on their product packs

denis-gorin avatar Jun 07 '21 13:06 denis-gorin

I thought I could redefine it in config/packages/cocur_slugify.yaml

cocur_slugify:
    separator: '_'

but failed

denis-gorin avatar Jun 07 '21 13:06 denis-gorin

Here Symfony allows the definition of separator SluggerInterface The solution might be to allow a user define it as well in yaml. Can I try this as well @bobdenotter ? If it's necessary.

abdellahrk avatar Jul 16 '22 21:07 abdellahrk