Alter a drupal view footer

Posted by: 
Dominique De Cooman

My problem was I didnt want php code in my views footer. But I still needed to check if a module existed to call a function of that module.
Here is the hook_views_pre_render, what happens in the function is :
- checking for the correct view and adding content to the footer
- setting the filter format which is the full html id
- setting the empty option

With this function not only the footer could be altered but the entire view could be altered since the views object is present.

 * Implementation of hook_views_pre_render()
function wishlist_views_pre_render(&$view) {
$view->name == 'wishlist') {
    if (
module_exists('orderlist')) {

For more

Add new comment

Who are you?

By knowing who you are you will be directed to a page where we have displayed all our drupal services relevant to your professional identity.