Taxonomy Lineage
The Taxonomy Lineage module adds a table to the taxonomy database which allows nodes to be sorted by taxonomy hierarchy. The module adds no new sort function by itself, so simply adding this module will not add functionality. However, it can be used with the Views module, and PHP snippets or custom code may be written to sort, as well.
- Problem
For example, with a hierarchy structured like:
Parent 1
Child 1
Sub-child 1
Child 2
Sub-child 2
Sub-child 3
Parent 2
...It is very difficult to get those nodes in the right order. So much so, in fact, that it requires a recursive query algorithm.
term_lineage whose sole purpose is to store the hierarchy in a single field. In order to make the field sortable, for each node in the hierarchy a string is constructed. The first part of the string is the term's weight + 10 (to eliminate negative numbers). The second part is the term's name. The third part is a carriage return, which is a character almost guaranteed not to be in the term name and will sort ahead of all possible characters that will be in the title.When a taxonomy term is updated, its lineage and the lineage of all of its children must be updated. If a taxonomy hierarchy is particularly large, this might be a noticeably slow process, but with a moderate sized hierarchy it took very little time on my system.
About the Developers
This module is maintained by Agileware Pty Ltd, http://www.agileware.net. Please contact us if you require a Drupal theme, custom Drupal module development, Drupal systems integration or have a complex Drupal project. We love Drupal!
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 5.x-1.4 | 2007-Nov-19 | 8.06 KB | Download · Release notes | Recommended for 5.x | |
| 4.7.x-1.2 | 2007-Jan-20 | 8.08 KB | Download · Release notes | Recommended for 4.7.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 5.x-1.x-dev | 2007-Jun-19 | 8.05 KB | Download · Release notes | Development snapshot | |
| 4.7.x-1.x-dev | 2007-Jan-20 | 8.08 KB | Download · Release notes | Development snapshot | |
