Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
Roosevelt's picture
Asked by on Wed 1st Sep 2010
Newbie Question: How do you use links to change a view in a block?

Hi all drupal gurus…

Newbie question that I am sure is more obvious than the nose on my face, but I’ve set up a view that returns multiple types of nodes, let’s say knives, forks, and spoons, all sorted by date posted, and they go in a block.

So, on my page, I enable that block, and sure enough, the latest knives, forks, and spoons all show up.

What I’d like to do is have three links on the bottom of that block, labeled knives, forks, and spoons, that when you click on them, they restrict the view to just that data type.

I can set an argument to node type and on the preview, enter knives, and sure enough, the view returns just knives.

But how to I add all that into the code from the site side of things? Bonus points if ajax is easy to include in your answer :)

Thanks in advance!

Commenting on this Drupal Question is closed.