Creating a dynamic view

In the previous recipe we saw how to create a view with a static filter applied to it. In this recipe we will be creating a view where the filter can be dynamically set by the calling URL, which contains the arguments. We will also be setting up a view which is generated from a URL in the following format:

http://www.example.com/news/8

This URL contains the argument "8", which will be used to filter the view to display only news stories from category 8, as in the following screenshot:

Creating a dynamic view

This technique can help to increase the flexibility of your view and to dramatically reduce the build time of your site when you are using ...

Get Drupal 7 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.