0

I have different content types, each content type has its own taxonomy terms - see screenshot. enter image description here

  • International News
    |--- Diplomacy
    |--- War
    -National News
    |--- Economy
    |--- Politics
    -Entertainment
    |--- Movies
    |--- Theater
    -Sports
    |--- Football
    |--- BasketBall

I built a view that, by default, lists all the content from the different content types/taxonomy terms and i wanted to add a select list that will allow the visitor to filter through content and get the nodes they're interested in (Football for example)

As you can see in the screenshot i have a filtering select lists block with a select list for each Content Type. Is it possible to have a single select list that groups all the content types and their taxonomy terms ?

If that's not possible. How can i reset the filters each time a filtering occurs. Right now, if i select Politics for example, the filtering is done and in the results we only get nodes that are tagged with that term which is exactely what it's supposed to do but on the resulting page, the filters do not reset themselves
If i select another taxonomy term, the first term i chose (Politics) stays on so unless there are nodes that are tagged with both terms, no nodes appear in the results page.

Any help is welcome

Thanks

  • Is there a reason you're using different content types? Why not a single content type with a hierarchy of taxonomy terms? Then you could use simple hierarchical select to do your filters... – Darvanen Nov 25 '14 at 4:24
  • @Darvanen There is a reason, actually. I could have but i didn't find a way to grey out Taxonomy Terms. If considered a single NEWS content type for example, but when creating a node i wanted the International News/National/Entertainment/Sports Taxonomy terms to be impossible to select. I wanted to force the selection of sub-terms (Diplomacy, war, economics, politics, movies ...). Since i couldn't achieve this, i chose to separate content types which after all was a handy solution since some content types have different fields – FlashSP Nov 26 '14 at 0:50
  • Fair enough - in that situation I would probably use a separate vocabulary for each content type then - and depending on what you plan to do with it, maybe even a list instead of a taxonomy. – Darvanen Nov 26 '14 at 1:24
0

You can follow this using below step:

  • Go to Administration -> Structure -> Views
  • Edit your existing view or create new new.
  • Add Filter for taxonomy terms you need
  • Click on "Rearrange" filter icon in Filter section
  • Click on "Create new filter group" and move filter taxonomy terms you need in new filter group.
  • Select Operator as "Or" in new filter group and save the form.

Views filter

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.