Drupal - How can I use pathauto to generate URLs for deeply nested vocabularies?

Try something like this as your vocabulary pattern:

[term:parent:parent:parent:name]/[term:parent:parent:name]/[term:parent:name]/[term:name]

And your last question should go away.

Just be sure to repeat the parent: part at least as many times as max term depth expected in your vocabulary. Pathauto will smartly skip overhead items.

I know it's not super-scalable, but it works for me.


Found a better way that scales

[node:menu-link:parents:join-path]/[node:title] 

All these answer are right but you can also use the Taxonomy entity index module which provides taxonomy tokens. Problems begin when your term contains slashes.

The taxonomy entity index module maintains a normalized index of all terms associated with a specific entity and revision. The core {taxonomy_index} table only maintains its data for published nodes. This module maintains its data for all entity types (regardless of published or not) and also indexed by revision.

Tags:

7

Path Aliases