Skip to main content
added 3 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

You can use hook_views_pre_render inside yourimplement hook_views_pre_render() in a module file.


 /**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view&$view) {
  switch ($view->name>name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}

-- Edited - This is an old post, module hooks belong in a module file and not in template.php

 

You can use hook_views_pre_render inside your module file.


 /**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}

-- Edited - This is an old post, module hooks belong in a module file and not in template.php

You can implement hook_views_pre_render() in a module.

/**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}
 
Post Merged (destination) from drupal.stackexchange.com/questions/33189/…
Module hooks belong in a module file and not in template.php
Source Link
JurgenR
  • 2.2k
  • 3
  • 19
  • 31

You can use hook_views_pre_render inside your template.phpmodule file.


/**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}

-- Edited - This is an old post, module hooks belong in a module file and not in template.php

You can use hook_views_pre_render inside your template.php file.


/**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}

You can use hook_views_pre_render inside your module file.


/**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}

-- Edited - This is an old post, module hooks belong in a module file and not in template.php

Source Link
JurgenR
  • 2.2k
  • 3
  • 19
  • 31

You can use hook_views_pre_render inside your template.php file.


/**
 * Implements hook_views_pre_render
 */
function MYMODULE_views_pre_render(&$view) {
  switch ($view->name) {
    case 'VIEW_NAME':
      // Your code here         
      break;
  } 
}