Return to Snippet

Revision: 22261
at January 8, 2010 08:36 by ReeceMarsland


Updated Code
/**
* Implementation of hook_views_post_render().
*/
function local_views_post_render(&$view, &$output, &$cache) {
  if($view->name = 'events') {
	  if(strlen($view->args[0]) == '4'){
		drupal_set_title($view->args[0]);
	  }
  }
}

Revision: 22260
at January 7, 2010 07:12 by ReeceMarsland


Initial Code
/**
* Implementation of hook_views_pre_render().
*/
function local_views_post_render(&$view, &$output, &$cache) {
  if($view->name = 'events') {
	  if(strlen($view->args[0]) == '4'){
		drupal_set_title($view->args[0]);
	  }
  }
}

Initial URL


Initial Description
this specifically checks the view name and then checks the arg length altering the page title if its a match

Initial Title
hook_views_post_render Drupal 6.x

Initial Tags
drupal

Initial Language
PHP