I'm needing to create a view block that will display the nodes that are tagged with a certain taxonomy term when that term page is displayed. For instance when the user is on my term page category/accommodation-category/lodges . I need a block view that will show all of the nodes referenced with lodges. I need this because the block view will be a gmap view and needs to display location points for each node.
Right now I've created a view for each known category and just used the filter to filter the view for the category I want and it works fine. I'm wanting to make this where when a category is added a new view would not need to be created. Something that can pull the argument and only show the relevant nodes.
How would I go doing this? Or at least a push in the right direction.
Comments
Comment #1
dawehneruse arguments:
- add a argument for taxonomy term
there are quite a lot of people which wanted to do the the same stuff in the views issue queue, search and you will find more answers :)
Comment #2
satcom74 commentedI guess I should be more specific. I have tried arguments that I've seen in the forums. I think the problem I'm having is that I'm using Pathauto to create the urls for the categories. Like category/accommodation-category/lodges . If I test the number of the term like term 9, I can do that pretty easy with the argument php code that I'm using. But in the real life scenario when I want the nodes that are tagged with a certain term to show up in a block on that page, it doesn't work.
So when you go to category/accommodation-category/lodges , you will also see a block that list the nodes where lodges is chosen as the category.
I've done quite a bit of searching and tried most of the examples that I'm seeing, just can't them to work.
Comment #3
dawehneras long as you are using just url aliases you can ignore them :)
the internal path is still taxonomy/term/$number
Comment #4
esmerel commentedno updates since suggested answer was given.