-
Notifications
You must be signed in to change notification settings - Fork 125
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
Filtering with translated content #580
Comments
There is no such feature now. Adding this to v1.1.0 ideas. |
I think you can override methods to do that in your controller look the Le lundi 15 juillet 2013, loostro [email protected] a écrit :
|
I had the same problem and I solve it overwriting this in my ListController : protected function processQuery($query)
{
return $query
->where('translations.locale = :locale')
->setParameter('locale', $this->getRequest()->getLocale())
;
} |
@bobvandevijver @montabou If this solution works, could you make a PR to update the Resources/doc/cookbook/a2lixTranslationFormBundle-integration.md docs? |
@bobvandevijver After rereading your problem I'm not sure that it will resolve yours. Using what I did just filter with current locale so that sort (for example) is performed on translated content and not all translations. It will not let you filter after that on some fields using the generator.yml as I guess it's not possible until issue #434 is not resolved |
After using my solution I've just figured out that it works only if there is a addJoinFor call before (with sorting on translations.something). So it's rubbish, sorry for that :-( PS: Well it works if you test if you have to leftJoin with translations before... |
Is it possible to filter on translated content?
I am using https://github.com/KnpLabs/DoctrineBehaviors for the translations, and https://github.com/a2lix/TranslationFormBundle to edit the translations fields.
If it is not possible (yet), than I would like to make this a feature request.
The text was updated successfully, but these errors were encountered: