2

My taxonomy structure looks like this:

Film
- Short film
- Special film

Using Pathauto, I would like the url to always include the root term.

So for nodes tagged with 'film' the path is: film/node-title. For nodes tagged with 'short film' the path is also: film/node-title

I thought the 'root term' token would do the trick, setting pathauto pattern to: [node:field-category:root:name]/[node:title]

But it only works for children. If a film is tagged 'film', the token isn't used for some reason. Perhaps I am misunderstanding the meaning of 'root'?

  • Why do you don't set it fix as a pattern? Pattern = film/[node:title] – Lance Apr 24 '12 at 12:09
  • Good point. It's because my vocabulary has other terms with children, such as Concert->Acoustic, Concert->Fundraising etc. – pushka Apr 24 '12 at 12:57
3

I encountered the same problem and wrote the patch for token module Here is patch https://drupal.org/node/2050421#comment-7806099

| improve this answer | |

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.