Since the case re-occurred to me for the second time recently, I decided to ask the question so to perhaps learn something.
In Views, the main display title (the one that usually gets rendered at the top of the view) is available in display output as $title
but does not seem to be available in style output at all. Instead, the $title
variable in style output means the name of a group if grouping is used.
What I want is to have that display title ('human name') available in any template as $display_title
. So what I did was putting this code in my template.php:
function MYTHEME_preprocess_views_view(&$variables){
if($variables['name'] == 'studios' && $variables['display_id'] == 'block'){
$view = $variables['view'];
$variables['display_title'] = $view->human_name;
}
dpm($variables);
}
...hoping to have the human title handy:
<?php print $display_title; ?>
...but no joy. What am I doing wrong?