Slugs with "/" and "-" characters #269
Unanswered
cv-chameleon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm saving slugs for nested categories. For perfomance reasons I save the combined slug of the nested structure to the slug field.
I also want a "-" character to replace spaces in the slugs.
So, for example, what I want in my slug field for a 3rd level category is
{'nl': 'dranken/wijn/rode-wijn' ,'en': 'drinks/wine/red-wine'}
.What I'm able to do now is
dranken/wijn/rode/wijn
while using->usingSeparator('/');
.But if I use
->usingSeparator('-');
, my slashes are removed from my full slug.This is my full code:
Thank you for helping out.
Beta Was this translation helpful? Give feedback.
All reactions