I need to change the number of items returned by a view, based on the theme!
- Read more about I need to change the number of items returned by a view, based on the theme!
- 2 comments
A friend recently came to me with the following question:
I have a site that has a mode optimized for low-bandwidth use. Can I change the number of rows returned by a view based on the theme?
The Views 2 API has a function called hook_views_query_alter() which allows you to modify the View object before it pulls the results from the database.
In order to use views hooks, you must create a module that registers itself as using the Views API: