We need a path like token for hierarchical taxonomy. Atm a token such as 'term3, term2, term1' is provided. We need a token 'term1/term2/term3'.

I've attached a patch that creates such a token. I think it would even be better if you could specify in a setting page if you want your taxonomy bottum up or top down and also which operator to use.

Comments

xjm’s picture

Status: Active » Needs review
awakash’s picture

Thanks, this is great! I'm using these tokens for my products: [field_category-terms_path-raw]/[title-raw]

I removed the array_reverse function since I wanted the categories listed in the opposite order. One thing though, how would we run the token through the filter for spaces and special characters? Currently, if we have categories such as Cats & Dogs, Dog Food, etc; the URL would appear as
Cats & Dogs/Dog Food/Biscuits
instead of
cats-dogs/dog-food/biscuits

Any ideas?
Thanks

Andrew Gorokhovets’s picture

Subscribe