You are here

17 August 2011

How to edit views content before rendering the view. This is what you need in your Drupal 7 module.

Source code viewer
  1. /**
  2.  * Implements hook_views_pre_render().
  3.  */
  4. function hook_views_pre_render(&$view) {
  5. // Change view_machine_name to your views machine name. You have to take pages in consideration as well.
  6. if ($view->name === 'view_machine_name') {
  7. print_r($view);
  8. }
  9. }
Programming Language: PHP