function commons_home_views_pre_view in Drupal Commons 6.2
Implementation of hook_views_pre_view()
File
- modules/
features/ commons_home/ commons_home.module, line 26
Code
function commons_home_views_pre_view(&$view) {
// When viewing the "Group showcase" block
if ($view->name == 'homepage_group_showcase') {
// Get the set title
$title = $view->display_handler
->get_option('title');
// Set the new title, replacing the %site-name token
$view->display_handler
->set_option('title', t($title, array(
'%site-name' => variable_get('site_name', ''),
)));
}
}