What are the URL Alias pattern replacements for taxonomy parent terms when building up Node paths? SCENARIO:


I created taxonomy terms with 3 depth levels. Example:

Term 1 ( Root )
   Term 2 ( Child of Root )
      Term 3 ( Child of Term 2 )

In the URL Alias for my vocabulary I set:

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

That successfully creates a path that looks like this:

"http://mydomain.com/term-1" for the root term
"http://mydomain.com/term-1/term-2" for the root's child term
"http://mydomain.com/term-1/term-2/term-3" for the child's child term

In my Content Type, I created a Term Reference field that forces the user to select the deepest term ( 3rd term down ) with the help of Simple hierarchical select module.




ISSUE:

When creating nodes, I would like to set the node's URL Alias to term-1/term-2/term-3/node-tile. I am having trouble finding the Replacement Pattern for doing just that.

Does path auto allow me to do that out of the box? If so, what pattern should I use?
There are some advanced uses of tokens (not sure off the top of my head if that's just in the context of pathauto or not). You can get what you're looking for with join:

[node:field-name:parents:join:/]/[node:field-name:name]/[node:title]


You could also replace your term pattern with:

[term:parents:join:/]/[term:name]


Using that method your vocabulary can grow gracefully to 4 (or more) levels without having to change the pathauto pattern.

You'll need to go to admin/config/search/path/settings and set the Slash (/) option to "Do not Replace" under "Punctuation" for that method to work.