I am unable to find the right token to use to get the full url for content associated with a nested taxonomy term. I am only able to the the parent, not the parents of the parent.

I am using this pattern for the content path of the content type in question:
[node:field_answerscategories]/[node:title]

field_answerscategories is a Term reference in my content type to my taxonomy vocabulary.

If my content title is navel and my vocabulary hierarchy is fruit/citrus/orange then I am only seeing a url of orange/navel rather than the full fruit/citrus/orange/navel.

I have the following installed:
Pathauto 7.x-1.2
Taxonomy 2.7
Entity API 7.x-1.5

I also tried turning on Entity Tokens 7.x-1.5 and the additional tokens available such as [node:field-answerscategories:1:parents-all] and [node:field-answerscategories:1:parents] did nothing.

Is this a token issue or just not possible with Pathauto?

This is the only thing not working on this site and if I can't get it to work I will need to not use taxonomy and will have to rework about 500 pages and their hierarchy manually and make a new view to display the categories/sub-categories for this section of the site. Not fun.

Pathauto you are so awesome for everything else!!! Please Obi-Wan you're my only hope.

Comments

ben.kyriakou’s picture

Status: Active » Fixed

Hi velvetpixel. I believe the pattern you're looking for is something like:

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

Here I'm using a taxonomy reference field called field-terms, so just change the name to match the field you're using. I had to install Entity tokens to get the parent path token, and the token was then available in Node > Tags > Terms > Parents, where Tags is the name of my taxonomy reference field.

I'm going to mark this as Fixed since this should solve your issue, but if you have further questions please set it back to Active.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.