Hello,

by default the primaty tabs are rendered in the content region. But that destroys my layout so I would like to move them to another region. How can I do that?

I already created a region--preface-first.tpl.php file and put this into it:
<?php if ($tabs && !empty($tabs['#primary'])): ?><div class="tabs clearfix"><?php print render($tabs); ?></div><?php endif; ?>

But that doesn't do anything. The file itself ist being rendered though.

Comments

l0calh0rst’s picture

Ok, found the answer myself.

function THEMENAME_alpha_process_region(&$vars) {
  if ($vars['elements']['#region'] == 'preface_first') { // preface_first or in whatever region $tabs should be available
    $theme = alpha_get_theme();
    $vars['tabs'] = $theme->page['tabs'];
  }
}

Create region--preface-first.tpl.php in your theme's template folder and add:

<?php if ($tabs && !empty($tabs['#primary'])): ?><div class="tabs clearfix"><?php print render($tabs); ?></div><?php endif; ?>

Done