OK. I have Pathauto and Token
I have the following Tag Structure:
Drinks > Beer
I want to use path auto to make all nodes tagged with Drinks or Beer to have a URL of /Drinks/[Node:title]
So essentially I can use [node:field-tags:0:parent]/[Node:title] to get it to work correctly for all nodes tagged as Beer.
However if the node is tagged as Drinks then the parent does not exist and it will just return the node title. So in that case I would want to use [node:field-tags:0:name]/[Node:title]
So what I am looking for is something like this (if it exists):
[node:field-tags:0:parent ELSE node:field-tags:0:name]/[Node:title]
I have looked into custom tokens and can't figure it out. I was hoping there was a simple way to do this.