Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
bzsim8's picture
Asked by on Sat 9th Oct 2010
How do I create this dynamic view in a block?

My question is very similar to http://drupalsn.com/learn-drupal/drupal-questions/question-2650, however not the exact same and I don’t know PHP all that well so I’m stuck!

What I want is to create one view that displays Events in a block that changes depending on what page the user goes to. For example if I create an Event with the taxonomy term apples and a user goes to mysite.com/apples, then the block should display only Events with the taxonomy term of “apples”. If they switch to the oranges page, then the view should display only those Events with “oranges” as the taxonomy term.

I got so far as to getting the view to work using Taxonomy term as my argument. While editing my view with the display of page I could use the path “category/event-type/%” and type in my arguments and I achieved the correct results in the preview. However I want this to be in a block and there is no path option when I switch to block. So how do I implement this in a block and how do I get the block to check the URL path and display the correct content?

Commenting on this Drupal Question is closed.