-
Notifications
You must be signed in to change notification settings - Fork 41
Description
The Seven themes uses the following hook, which moves primary and secondary tabs into the header section.
function seven_preprocess_layout(&$variables) {
// Don't modify layouts that are being edited.
if (!$variables['admin']) {
// Move the page title and tabs into the "header" area, to fit with Seven's
// markup requirements.
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;
}
}
}
The effect is that tabs in pages like /admin/content/comment appear as in the following screenshot.
The tabs should be instead rendered as in the following screenshot.
When there are just primary tabs, all is fine.
(I fixed the second screenshot, which was not the correct one.)