This post is to propose an enhancement of taxonomy module so that it will be possible to to filter nodes also on node type.

This is a need when you have to share one vocabulary between multiple node types.
One example is the vocabulary 'Geography', containing all Cities and Regions. You could have events, stories and other custom made node types, sharing this vocabulary.
The need arises when you want to see only events of a certain region; if you filter only on region, you'll see also stories and the other custom node types.

The new syntax, according to new Drupal 4.5 syntax, could be the following:

taxonomy/term/term1,term2,term3(nodetype1,nodetype2)/........

to filter based on three terms (in OR each others) and on two different node types

or

taxonomy/term/term1+term2+term3(nodetype1,nodetype2)/........

to filter based on three terms (in AND each others) and on two different node types

The rest of the syntax for taxonomy/term will remain the same.

Node types should be tested for validity. You can specify one or more node types; if you omit node types, normal term filtering is issued.

I understand that this need is a common interest of many people; in the past I submitted a patch that adds such feature, but it remained in a limbo situation.

I would like to go on with it, because I need for some sites I'm setting up, but would like to avoid creating a new module, and would like to have such feature in the core, so that modules like taxonomy_html, taxonomy_browser and taxonomy_dhtml could benefit from it.

I'm available to port the patch to Drupal 4.5.1, but before going on, I would like an official position on this matter by the Drupal core Team....

Thanks to all !

Matteo

Comments

matteo’s picture

Is anyone interested in such a feature, or is it in contrast with future development ??

Matteo

Steve Dondley’s picture

I created a Node Type-Categories module to do just this. It also has a "plain language" feature that lets you do this using the name of the category.

Check it out: http://drupal.org/node/13906

matteo’s picture

thanks for you feedback !
I saw your module, but it lacks many of the features I would expect by a product like Drupal.
This expecially because in my opinion, such features should be inside core taxonomy module, and usable for feed and page, and usable by any other module using taxonomy.
I will work on a definitive patch for taxonomy and submit it to core development, let's see....

Matteo