Ok, that one might be too much too ask for. Well, anyway.

View filters are ANDed by default.
Sometimes a little OR might be useful though.
Example :

Show nodes that :
      - are of type 'my-type'
(AND) - are published OR belong to current user.
(AND) - ... whatever ...

It would be awesome to be able to have several filter sets for a given view
filters inside a set would be ORed
the resulting clauses (one for each set) would then be ANDED.

I understand that the UI implementation might not be a pleasant thing to do.
Maybe in the API only, to begin with ?

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

You are correct in that this is a logistical (pun intended) nightmare from a UI perspective. Implementing it is possible, but then filtering because a maze of parentheses and operators. It's ugly every time I draw it out, and while yes, there are places that it could be useful, I haven't been satisfied with the cost.

It can be done at a very low level by using $query->add_where in a filter handler. Which is probably not the answer you wanted, but that's about the only one I have right now.

gpk’s picture

Status: Closed (won't fix) » Closed (duplicate)

There appears to be an active issue for this: #118672: Adding sql ORing capability with filters.