0

I have created a Taxonomy Term view in Drupal 7, and list out all my terms through "Taxonomy term: Name" field.

Now, I wonder how to extract the link path of each term so that I can reconstruct and adding the passing value through the url.

e.g.

http://www.domain.com/fruit/apple?quantity=100

1 Answer 1

2

A quick solution will be:

  1. Use "pathauto" to generate path for term pages (taxonomy/term/term_id => fruit/apple)

  2. Use "global redirect" to force default path to custom paths

  3. In your View build the URL like taxonomy/term/term_id?quantity=100 and should be translated at rendering time to fruit/apple?quantity=100

Thank you.

2
  • Thanks! It works! Actually without using "global redirect", the "taxonomy/term/[tid]?quantity=100" applied in View's field link path will still rendered to "fruit/apple?quantity=100" automatically. I guess the Pathauto do the magic. However, if I enable "global redirect", when typing the "taxonomy/term/1" in the url manually, it will automatically force default path to custom path "fruit/apple". Great thanks!
    – Adamtan
    Commented Aug 5, 2012 at 5:15
  • Glad to know it works for you.
    – Emil Orol
    Commented Aug 6, 2012 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.