I need to create a View with a search box for my content type; the search string has to match both title OR a CCK taxonomy field. Is there a Views module that permits to do it? I've tried http://drupal.org/project/views_filters_populate but it only works with 2 string fields.
-
Yeah you are right. Populate module doesn't work with taxonomy filter. I can give you advice to do it in one of views_hooks. You can add custom "where" condition to your query using value of exposed filter. (api.drupal.org/api/views/views.api.php/7)– milkovskyCommented Sep 10, 2012 at 7:31
Add a comment
|
1 Answer
Yes,by default drupal handled this.
in Filter criteria
in your views click and hold arrow sign
beside add
.open menu with And/Or, Rearrange
.In this section(Rearrange filter criteria
) you can determine gorup for your filter and criteria between your filters.
-
Cool, didn't know it, thanks! But i still have a problem ... if i expose a filter on title, i need to add as OR condition another field (a taxonomy term); if i do this it does not work. Is it possible to use the exposed filter and make the OR from this and another field?– CrisCommented Sep 11, 2012 at 13:54
-
yes,it is . you can gorup up them, you can use OR condition in a group and another group use AND and between gorups use AND or OR .– YuseferiCommented Sep 12, 2012 at 9:31