By rfyffe on
Hi Everyone looking for advice on taxonomy and views.
Would there be a way to display a block but filter it to specific terms/vocabulary depending on page being viewed?
My pages have the following URLs:
domain.co.uk/things-to-do/
domain.co.uk/food-and-drink/
domain.co.uk/accommodation/
So basically if the user is on 'things-to-do' page I would like the view to filter to 'Things to do' vocabulary. I know I can create a block for each page and just set the Vocabulary filter but is there a way to do this dynamically?
Thanks
Robert
Comments
hi. you can use Contextual
hi. you can use Contextual Filtering. Until Drupal 6, these were called as Arguments. This allows you to specify page urls as arguments that will be used to filter the content being displayed. You can select Taxonomy Term as your argument from URL and then configure settings accordingly. You will find this option under Advanced tab on the view building UI.
Sateesh Nutulapati
Devops Solutions Architect at New Target, Inc.
Thanks for the reply. How
Thanks for the reply.
How does it extract the term from the URL?
This is not the url for that term, this is a page I have created.
Thanks
Robert