Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert kalatheme_links__system_secondary_menu #277

Open
labboy0276 opened this issue Jun 9, 2016 · 0 comments
Open

Convert kalatheme_links__system_secondary_menu #277

labboy0276 opened this issue Jun 9, 2016 · 0 comments
Assignees
Milestone

Comments

@labboy0276
Copy link

Reference: https://www.drupal.org/node/1354#themepreprocess

Convert kalatheme_links__system_secondary_menu in includes/menu.inc to template_preprocess_menu__secondary(&$variables) in KalathemeBootstrap Class (John added placeholder it to the interface):

Add in menu--secondary.html.twig

The theming in the menu system is a little different and this seems to be right based on John's research. If not, just correct it to the way that wins.

Also there is some residual code for this in kalatheme_preprocess_page (move to preprocess):

  // Prepare the secondary_nav
  $sec_attributes = array(
    'id' => 'secondary-menu-links',
    'class' => array('nav', 'navbar-nav', 'secondary-links'),
  );
  if (!$variables['secondary_menu']) {
    $sec_attributes['class'][] = 'sr-only';
  }
  $variables['secondary_nav'] = array(
    '#theme' => 'links__system_secondary_menu',
    '#links' => $variables['secondary_menu'],
    '#attributes' => $sec_attributes,
    '#heading' => array(
      'text' => t('Secondary menu'),
      'level' => 'h2',
      'class' => array('sr-only'),
    ),
  );

@labboy0276 labboy0276 added this to the 8.x-alpha milestone Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants