When click on any term, content related to that term should be displayed on the right hand side of a page. I have my taxonomy tree on left sidebar using Drupal API function.

What I had done is:

  1. Created view with content type, containing all products related to taxonomy terms.
  2. Add a field in that content type with field type "term reference" and widget type "simple hierarchical select" module.

Now what should I do in order to filter the term based content? Any Ideas?


If I understand your question correctly, sounds like you maybe want to use a contextual filter for the taxonomy term TID, and embed as a block in the sidebar for taxonomy pages.

This may help: http://dannyenglander.com/blog/using-views-contextual-filters-create-related-content-block-drupal-7

Steps to help:

  • create a relationship, Content: Taxonomy terms on node, choose taxonomy, check require this relationship
  • add contextual filter, Taxonomy Term: Term ID, select the relationship you just made, check "provide default value- Taxonomy term ID from URL, Load default filter from term page.

Just checked on a vanilla install, and that worked a charm for me...

  • Thanku Daniel for your reply, but how should I get the specific path when click on any taxonomy term?Because What I have understand is, first I should get the path of term on the basis of tid then can use contextual filter. Beacuse the current scenario is when I click on any term nothing change in the url – nomeer Mar 10 '15 at 5:00
  • Edited above to add relationship steps. – Daniel Rogers Mar 10 '15 at 13:58
  • Thanku @daniel, but I think you didnt get my point. I have taxonomy tree fetched using drupal api function so how can I link these terms ? – nomeer Mar 11 '15 at 3:26
  • I have the tid of each term just and name :( – nomeer Mar 11 '15 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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