Skip to content

Convert kalatheme_menu_local_tasks #273

@labboy0276

Description

@labboy0276

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

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

Add in menu-local-tasks.html.twig

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

  // Define variables to theme local actions as a dropdown.
  $dropdown_attributes = array(
    'container' => array(
      'class' => array('dropdown', 'actions', 'pull-right'),
    ),
    'toggle' => array(
      'class' => array('dropdown-toggle', 'enabled'),
      'data-toggle' => array('dropdown'),
      'href' => array('#'),
    ),
    'content' => array(
      'class' => array('dropdown-menu'),
    ),
  );

  // Add local actions as the last item in the local tasks.
  if (!empty($variables['action_links'])) {
    $variables['tabs']['#primary'][]['#markup'] = theme('menu_local_actions', array('menu_actions' => $variables['action_links'], 'attributes' => $dropdown_attributes));
    $variables['action_links'] = FALSE;
  }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions