Using views with category

The categoryi_views module allows you to display node listings on your category pages using a custom view, instead of using the default node listing renderer. This is the main way in which you can achieve integration between category and the views module.

Note: neither category nor category_views currently implements the hooks provided by the views module. For this reason, in order to make effective use of category_views, you will need to have the taxonomy wrapperi installed.

Using category_views requires that you set up your custom views in a particular way. Here's how you set up such a view:

  1. Go to administer -> views -> add to start adding a view.
  2. In the basic information box, enter a name and a description for your view (e.g. Category view 1).
  3. In the page box, tick the provide page view option, and enter a URL for your view (e.g. view/category). It doesn't really matter what the URL is, because you won't be using it to access the view.
  4. Select the view type that you wish to use for your view. This will determine how the view renders your node listings on category pages. It is recommended that you tick the use pager setting. You can leave the nodes per page setting at 10, or you can change it to a value of your choice.
  5. In the fields box, add the fields that you would like displayed in your view. These fields are the ones that will be shown in your category listings (e.g. node: title, node: author name).
  6. This is the important part:
    In the arguments box, add taxonomy: term ID as an argument. When using this view to render your node listings, category_views will expect this argument to exist, and will pass the ID of the relevant category as an argument to the view. The view will then use this argument in filtering its node listing.
  7. The rest of the settings are up to you. The idea of category_views is that you have access to the flexibility of the views system, so go ahead and make the most of it! When you're done, save the view.

Once you have a custom view that's ready for use with category_views, simply add or edit one of your containeris, and go down to the category view settings box. In the view for this container setting, select the custom view that you created. Then configure where you want the view to show, with the show view on setting.

That's all that's involved in using category_views. You should now see your node listings being displayed in new and exciting ways that you never before thought possible. Enjoy!

Yes

The page will be updated if and when this changes.