6

I have the content type 'machine' that uses two vocabularies (producer, category). I would like to create node alias like [language]/machines/[producer-name]/[title-raw]; [producer-name] is from the vocabulary.

Could anybody give me any advice?

2

The Token module provides very simple and limited taxonomy options. It will only provide the top most term of the top most vocabulary by weight.

The simplest solution will be to use a module like this: http://drupal.org/project/taxonomy_token

It will allow you to configure custom tokens for exactly the term/vocab you need.

1

Is [termpath-raw] what you're after?

The token is described as:

As [term-raw], but including its supercategories separated by /. Warning: Token value contains raw user input.

  • But how do you use this? I have this path for my node: blogpost/[node:nid]/[termpath-raw]/[node:title]. Of course this does not work. I need to replace the "[termpath-raw]" you had suggested with the term actually configured in the node. It is essential for my URL to have the term name it is linked to... But the Pathauto interface does not present options of field tokens to use with my path... Only node configuration options, author, system and some others. Is it possible to enable tokens related to the fields? Thank you. – Marcos Buarque Jun 20 '11 at 13:30
  • Sorry for the long delay. Hope you've got it sorted by now. If not, then the URL alias setting I'm using is "[termpath-raw]/[title-raw]" – shonk Sep 14 '11 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.