-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter by slug with different lang active #906
Comments
Unique slugs were discussed a few times before and the core only provides Do you use the inbuilt slug function The language filter replaces all values with the translations after it found something. So you can't query against
"entries": [
{
"title": "Hello",
"title_slug": "hello",
"...": "..."
}
], Example with Query: Output: "entries": [
{
"title": "Welcome",
"slug": "bonjour",
"title_slug": "welcome",
"...": "..."
}
], |
@raffaelj
Now I let UniqSlugs.slug_name as "slug" in the config and remove "slug": true in my field collection, seems to be ok. |
Thanks for your mail. I am out of the office and offline all day Tuesday 30 October 2018. For any urgent matters please do not hesitate to contact the office, otherwise I will respond to your mail on Wednesday.
|
Ah, OK - I understand. So setting
No problem per se, but may be useless...
No problem at all, but don't use the same name as an auto-generated AND multilingual slug field. I'll add it to the docs. |
Hi,
use case is 2 or more languages. Default is fr.
When query posts using lang EN, everything is ok, posts coming from api are using English translation if set, of default one.
Then, the logical is to set a href to each post using (in my case) the title_slug set in collection.
Next query will be to query post by slug.
I surely can query by _id or check first if requested language is set and then, if not, request for the default language, but i don't want :-) (in fact that's what i do now)
So my question is, as it seems to be a good practice to keep a unique slug for a same item, even when having multilingual, what do you think about having an option like "multilingual_unique_slug=true" and set all languages slug to default one.
Thanks
The text was updated successfully, but these errors were encountered: