Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am loving the level of control that omega 4 offers over 3... well done.
I have a question regarding the classes you chose for the local tasks.
Is there a reason why you overrode the classes that core normally spits out?
/**
* Returns HTML for primary and secondary local tasks.
*
* @ingroup themeable
*/
function omega_menu_local_tasks(&$variables) {
$output = '';
if (!empty($variables['primary'])) {
$variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
$variables['primary']['#prefix'] .= '<ul class="tabs tabs--primary links--inline">';
$variables['primary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['primary']);
}
if (!empty($variables['secondary'])) {
$variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
$variables['secondary']['#prefix'] .= '<ul class="tabs tabs--secondary links--inline">';
$variables['secondary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['secondary']);
}
return $output;
}
The reason i ask is cause admin menu likes "tabs primary" and "tabs secondary" which i see i can inject with a theme override, however, I see that you also have some sass using these classes and i don't want to mess that up?
Marked this as minor as I am just curious.
Comments
Comment #1
bradallenfisher CreditAttribution: bradallenfisher commentedIf someone else is curious, about how to get your view edit devel etc tabs to show up in admin admin menu just use this snippet in your template.php
Change yourthemename to the name of your theme...
Also don't include the closing ?> tag.
Comment #2
fubhy CreditAttribution: fubhy commentedYeah I guess what you did there works. We removed those classes in Omega because we decided to go with BEM as it is part of the D8 CSS coding standard.
Comment #3
bradallenfisher CreditAttribution: bradallenfisher commentedGotcha. Thanks. That makes sense.