Cover by Dylan James

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required