The Taxonomy Token module allows the user to set vocabularies for which there will be created specific tokens. It's main use is together with the Pathauto module.
Drupal 7 support
As far as I can tell, this module isn't necessary in Drupal 7 at all.
The core Taxonomy and Token core modules already offer similar features.
It should be noted that Taxonomy in Drupal 7 works rather differently than it did up to Drupal 6. This is not the place to explain in detail the differences but in resume in Drupal 7 Taxonomies are related to nodes through fields of the type Term reference.
To get Taxonomy term info for some node you should use something like
[node:field_my_vocabulary]in Drupal 7 where you would use
[node:vocab:TID:term] in Drupal 6 with the Taxonomy Token module. This example considers you named your term reference field My Vocabulary.
When migrating from Drupal 6 to Drupal 7 you will have to manually change the tokens from the old format to the new one.
For more complex scenarios you can try the Compound Token module. I've not tried it but it promises major flexibility that should enable even the wildest requirements.
It can create two types of per vocabulary tokens: single term and full term path.
As the creation of specific tokens for each vocabulary might have some noticeable performance impact it's advised to enable specific token creation only for the vocabularies that will actually be used. The performance impact will probably be more intense with the creation of full term path tokens.
- core Taxonomy module
- Token module
Usage documentation is maintained as Advanced Help pages.
Taxonomy Token is maintained by rsevero
Development is sponsored by Fábrica de Ideias.
The idea for this module came from code available at jenlampton.from
There are no new features planned. The roadmap for now is just a, hopefully, straight line to a stable release with at least a one-week BETA and another one week RC.
You can see the issue queue.
Comparison with Category Tokens module
The Taxonomy Token module is similar to the Category Tokens module. Here is an attempt to outline it's differences.
Vocabulary identification method
Taxonomy Token uses the vocabulary id (number) to identify the vocabulary in the token name. For example [node:vocab:1:term] is the top term name in vocabulary with id 1. This method guarantees that token names remain constant even in case some vocabulary name is edited.
Category Tokens used a simplified version of the vocabulary name. For example [first-term-name-in-office-position-or-title would result in the same info as above if the vocabulary with id 1 is named "Office, position or title". This method provides more readable token names.
Taxonomy Token offer a few tokens not available in Category Tokens, namely the tokens that provide all parents of each token:
- As [node:vocab:TID:term] above but including its supercategories separated by /.
- As [node:vocab:TID:term:url] above but including its supercategories separated by /.
- As [node:vocab:TID:term-raw] above but including its supercategories separated by /. WARNING - raw user input.
Configuration options X performance impact
Taxonomy Tokens allows the user to set one of the following token type options per taxonomy:
- no tokens generated;
- only single term tokens generated;
- single and complete (full path) token generated.
With these options the performance impact of the module can be reduced to the minimum necessary to achieve the desired results by enabling token generation only for the pertinent taxonomies.
Category Tokens has no similar configuration options.