Directory-like browsing of Drupal taxonomies
In my case I like using freetagging taxonomies, which results in lots of taxonomy terms, and then I like to arrange those terms into a hierarchy. Using a hierarchy helps the visitor understand the vocabulary lists by clumping related terms together. Unfortunately the default view of taxonomy term lists is not to my liking. It simply lists (using a pager) teasers for the nodes having a given taxonomy term. I want the taxonomy term list to do some more useful things including:-
- List related and child terms
- Give a description (optional) of the term
- List the nodes of the term, using a pager
The first module to use is Taxonomy Redirect because it allows you to override the display of taxonomy term lists. By default the URL for the default view of a given taxonomy term is example.com/taxonomy/term/tid where tid is the numerical term ID. Taxonomy Redirect causes Drupal to display some other URL than the default, which causes all links for taxonomy term display to redirect to something other than the default.
By replacing the handling of taxonomy term listing, one could do essentially anything to display terms. With Taxonomy Redirect the URL for viewing a given taxonomy term will become example.com/something/tid where something will trigger some kind of handler which takes tid as an argument to specify the term ID to display.
Directory is oh so very very close to what I want. Really. But not quite. I am however using it (for the moment) on 7gen.com.
Taxonomy context is also close but is wrong enough that I'm not gonna use it.
There are some features in the Views Bonus Pack which might be able to supply the needed functionality. But I am finding it obtuse enough to not make sense. In particular one of the Views types, when the Bonus Pack is installed, is Lineage: Nested taxonomy summary. I suspect it will provide the child and related taxonomy term listing. But as I said, it doesn't make sense.
The taxonomy module provides a few interesting methods: taxonomy_get_children, taxonomy_get_related, taxonomy_get_synonyms .. these will retrieve the list of related and child terms which I'm interested in. It should be simple to write a module that takes a term ID, uses these functions, and somehow generates a node list for the term.
Taxonomy Introduction already handles giving a description of taxonomy terms. For each term you can give a description, and that description will be displayed at the head of the default taxonomy list page. Clearly if you've overriden the default taxonomy display using Taxonomy Redirect, the new module must find and display the introduction text.