2

I have select box with taxonomy term ID's in it and when i change the term the respective content appears. This work well.

I am having the same term id's as click-able links on Left side block. I was thinking if i could pass a argument to a view from the URL and make the view content change as per the argument. Is it possible ?

1

2 Answers 2

1

Your're looking for "contextual filters". Add the Content: Has taxonomy term ID contextual filter. You can use taxonomy term names with this filter by adjusting Specify validation criteria settings.

Drupal 7 views contextual filters taxonomy name.

2
  • that was a wonderful1. Can i highlight the term in the exposed filter when term is passed in the URL?
    – Hacker
    Commented Sep 23, 2011 at 2:47
  • "highlight" as in display it on the results page and use markup (HTML/css) to display the term? Of course :) You'll need to be more specific with your question if you want details.
    – DeeZone
    Commented Sep 23, 2011 at 10:41
1

Yes, you can do this with two views two views.

Create the first view for the the block showing the term ids. It should be possible to change the links the way the second view expects them. May be you need some PHP do achiev this.

With the second view you expect the term id as a filter and show the appropriate information.

1
  • - can you tell me how to do the second part that is accepting term id as parameter in view for the filter?
    – Hacker
    Commented Sep 22, 2011 at 17:45

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.