Simple non-hierarchical select

Categories

Component ID

2121163

Component name

Simple non-hierarchical select

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module creates a simple non-hierarchical select views filter and merge repeated children. This module is based on https://drupal.org/project/shs module.

Use case

Assume that you have a vocabulary named 'services' and has structure like this:
-Paris (1)
---Restaurant (2)
---Hotel (3)
-New York (4)
---Restaurant (5)
---Hotel (6)
-Other location (7)
---Restaurant (8)
---Hotel (9)

Suppose you can't change this structure (e.g. separate this vocabulary into 2 vocabularies, make a term child of multiple parents...)

What if you want to find all services in Paris? What if you want is find all Restaurant services?

This module provide views filter like https://drupal.org/project/shs module does, but it shows parent and children dropdown at the same time, so you can select 'Restaurant' in the child dropdown to find all restaurant services, or select 'Paris' in the first dropdown to find all services in Paris, or specify 2 dropdowns to find all restaurants in Paris.

Configuration
Views (exposed filter)

  • add a new filter "Content: Has taxonomy terms (with depth; Simple non-hierarchical select)"
  • use "Simple non-hierarchical select" as selection type
  • select "Expose this filter to visitors, to allow them to change it"
  • enjoy :)

Dependencies

  • taxonomy
  • views 3

Related modules