Needs review
Project:
Content Taxonomy
Version:
6.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2010 at 08:55 UTC
Updated:
13 Sep 2010 at 07:21 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| patch_content_taxonomy_token_inc_20100311.patch | 1.33 KB | diricia |
Comments
Comment #1
xjmComment #2
awakash commentedThanks, 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
Comment #3
Andrew Gorokhovets commentedSubscribe