0
votes

I'm having a hard time with this Drupal 7 question.

I have a view which lists articles. Each article has a category, which is a entity referenced taxonomy term. When I visit a URL, my taxonomy should match something in the URL. For example, if I go to news/localnews, there's a taxonomy option whose value is news/localnews.

What I'd like to do is display only articles which contain the same taxonomy term as in the URL. I have no idea how to do this and I've been working on this problem for about 5 months. Any help would be greatly appreciated!

All I really want to do is add a block (or several, on most pages) which just displays a list of articles which match the taxonomy in the URL.

Can this be done? If so, how?

Thanks!

1

1 Answers

0
votes

In your views, on the Advanced tab, add new Contextual filter enter image description here Choose Content: Has taxonomy term ID (with depth)enter image description here

Set Depth to 1 and select Provide default value with Type : Taxonomy Term ID from URLenter image description here