0

I have a view with exposed filters that are taxonomy terms. These are multiple select.

When none of the options are selected the nodes are not filtered by that vocabulary so everything is returned. But what I need to happen is only noes not tagged with any of those terms be shown. Can this be done?

0

So you want the inverse of a search? Or have I misunderstood?

If thats what you mean I think you can change that inside your view settings.

Go to Structure > Views > edit your view

Then select your filter criteria and edit it. I think you need to check the following check box.

enter image description here

| improve this answer | |
  • No thats not what I mean. Lets say I have 3 terms A, B and C. If you select A then only nodes tagged with A are returned. If you select A, B and C then any node tagged with either A, B or C are returned. So far good. However the issue is that if you dont select A, B or C then all the nodes are still returned. Its just this last behavior im trying to change. – Evanss Oct 24 '13 at 16:24
  • Hmm I thought that was too simple. Ok how about using hook_form_alter to add an extra validate function which if all three are empty changes the operator? (Conceptually ok, I have no idea how to do the last part). – Dominic Woodman Oct 24 '13 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.