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

bradallenfisher’s picture

If 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.

/**
 * Returns HTML for primary and secondary local tasks.
 *
 * @ingroup themeable
 */
function yourthemename_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 primary 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 secondary tabs--secondary links--inline">';
    $variables['secondary']['#suffix'] = '</ul>';
    $output .= drupal_render($variables['secondary']);
  }
  return $output;
}
fubhy’s picture

Status: Active » Fixed

Yeah 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.

bradallenfisher’s picture

Gotcha. Thanks. That makes sense.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.