Taxonomy Sifter

Last modified: September 6, 2009 - 12:24

Taxonomy Sifter is a Drupal module that provides a block with terms which any or all selected must apply to a node for it to be listed when viewing a taxonomy term page, e.g. taxonomy/term/... The vocabularies used in the block is configurable.

Taxonomy Sifter is developed by Thomas Barregren at imBridge and Nancy Wichmann. The initial development was sponsored by SSPA Sweden.

Background

Given the path taxonomy/term/..., where ... is the identity number of a taxonomy term, Drupal responds by dynamically building a page with teasers of nodes with the given term applied to them. Often, more than just one term is applied to a node. By combining several terms with either the OR operator (+) or the AND operator (,) the returned teasers will correspond to nodes with any or all, respectively, of the terms applied. For a further explanation of the taxonomy navigation, see the handbook.

There are several modules that leverage this feature by providing a block with a user friendly interface for combining the terms. Some examples are Refine by taxonomy, Taxonomy Filter, and uBrowser. These modules works as filters which can be refined step-by-step. But, once the taxonomy term page is left, for instance by viewing a node sorted out by the filter, the filter is reset. That is often the desired behavior. But if the purpose of the filter is to provide a short-list of nodes to be reviewed, it can be very frustrating to reapply the refinement over and over again.

To this end Taxonomy Sifter provides a block where the user can select terms that automatically will be combined with the terms in every request of the form taxonomy/term/... The selected terms are combined with the same operator already used in the request. If no operator is used, that is a single term is given, the sifter use the operator given in the module's settings. The vocabularies of the terms presented in the sifter block is also configurable.

Installation

Install Taxonomy Sifter as follows:

  1. Enable core's Taxonomy module.
  2. Download and install Taxonomy Sifter as described in the handbook.

Configuration

Configure Taxonomy Sifter as follows:

  1. Go to admin/user/access.
  2. In the taxonomy_sifter module section, grant the administer taxonomy sifter permission to roles of which users should be able to administer the Taxonomy Sifter block.
  3. In the taxonomy_sifter module section, grant the view sifter block permission to roles of which users should be able to use the Taxonomy Sifter block.
  4. Go to admin/build/block, and click on the configure link for the Taxonomy Sifter block.
  5. In the Taxonomy Sifter Settings, select one or more vocabularies.
  6. In the Taxonomy Sifter Settings, select the operator (,/+) to use to combine terms if no one is used in the URL.
  7. In the Page specific visibility settings, choose the alternative Show on only the listed pages and put taxonomy/term/* in the Pages text area.
  8. Press the Save block button.
  9. Enable the Taxonomy Sifter block by choosing a region.

Usage

The Taxonomy Sifter block appears on taxonomy term(s) listing pages.

To combine the terms in a request for taxonomy/term/... with terms in sifter block, select the terms in question in the sift block and press the Sift button at the end of te block.

If the URL contains more than one term, the terms in the URL and the term(s) selected in the Taxonomy Sifter block are combined with the operator (,/+) used in the URL.

If the URL contains a single term, the term in the URL and the term(s) selected in the Taxonomy Sifter block are combined with the Taxonomy Sifter default operator configured as described above.

To restore the default behavior of taxonomy/term/..., press the Reset button at the end of the block.

 
 

Drupal is a registered trademark of Dries Buytaert.