I am creating a review site that will have somewhere around 80 different categories. Each review will contain a CCK field called "category" where I will select how the review should be categorized. For a test I created a views page to display nodes with the cck field "category" that equals "computers". This works great for showing all of the reviews for that category, but I don't want to create 80 instances of that view. I was hoping that there was a way of executing an argument to re-use the same view based on the URL.

So for example:

?q=categories

would be the base link to the view

?q=categories&cat=computer

would display the view showing only nodes with a category field of "computer"

Does anyone have the answer to this situation?

Comments

pkej’s picture

Look into arguments. search google for views, drupal, arguments

nevets’s picture

Probably easier if you use taxonomy for categorizing, but the concept should be the similar. First think in terms of the views path (in this case 'categories' and the argument added as categories/computer where 'computer' is the argument. When edit the view you can argument handlers.

shadow_jh’s picture

Thanks, this was a big help. Im not sure why I overlooked taxonomy!

farald’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.