I'm writing a sub-theme of Seven, and I don't want the page title or tabs being displayed in the Header region. But Seven puts them there in such a way that it doesn't seem possible to remove them...
if (isset($variables['content']['header'])) {
if ($variables['title']) {
$title = '<h1 class="page-title">' . $variables['title'] . '</h1>';
$variables['content']['header'] .= $title;
$variables['title'] = NULL;
}
if ($variables['tabs']) {
$tabs = '<div class="tabs">' . $variables['tabs'] . '</div>';
$variables['content']['header'] .= $tabs;
$variables['tabs'] = NULL;
}
}
(Source: https://api.backdropcms.org/api/backdrop/core%21themes%21seven%21templat...)
By appending the title and tabs as strings to the end of the $variables['content']['header']
variable, it makes it impossible to remove using another preprocess function. I thought about maybe recreating the $variables['content']['header']
variable in my preprocess function from scratch less the title and tabs, but it seems to be too late in the chain to be possible either.
Does Seven need to do it this way? Would the alternative be for Seven to override all layout templates and do it in them instead? Would that help here or not?
Recent comments
@yorkshirepudding - Thank you! That's just what I needed. In the code, it's actually fontyourface_ui_settings_form (with underscores rather than dashes). Now it's working ... I only have to figure...
Question about hook_form_FORM_ID_alter
Oh the benefits of a new set of eyes.... I don't know how many times I've looked at that css and not spotted that! Mind you, in my defense, my eyes are over 70 years old (and obviously in need of...
How to over-ride grid-flexbox.css
thanks yorkshirepudding, i used the CSS Injector option with this code and it works .views-table caption { font-weight: bold; color: blue; font-size: 26px; }
How to change the format of the Views group title field?