In my multi-site set up, I have two sites, using different templates: one has the Edit Panel link in the local task menu, the other (Garland) doesn't have it. It's not like I have to have the link, but it does make my work much easy by having immediate access to edit the panel page.

What could I be missing here?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Fixed

In order to get that Edit Panel link into the local tasks, CTools is playing a trick on the theming of the links. With Garland this is tricky because it is also overriding the theming for this.

For stock Garland, CTools includes a special override for Garland to fix this which may not be happening for you if you're using a copy of Garland. IN that case, I recommend looking at ctools_garland_preprocess_page() in ctools.module -- you may need to copy the change it makes to the local tasks into your theme's preprocess.

Status: Fixed » Closed (fixed)

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

gmclelland’s picture

Not sure why, but I have this problem with TAO sub themes. No "Edit Panel" local tasks appear.

gmclelland’s picture

Version: 6.x-3.3 » 6.x-3.8
Status: Closed (fixed) » Active

I noticed that the TAO theme uses the following in the template.php:

  // Split primary and secondary local tasks
  $vars['tabs'] = theme('menu_local_tasks', 'primary');
  $vars['tabs2'] = theme('menu_local_tasks', 'secondary');

I tried adding this to my _preprocess_page function in my template.php, but it didn't work. Still no "Edit Panel" links

if (module_exists('panels')){
$vars['tabs2'] = ctools_menu_secondary_local_tasks();
}

Any thoughts on how I can get this working? I opened an issue in the TAO queue, but no one has responded.

gmclelland’s picture

Status: Active » Fixed

Got it working in TAO with this in my template.php

/**
 * Override of theme_menu_local_tasks().
 * Add argument to allow primary/secondary local tasks to be printed
 * separately. Use theme_links() markup to consolidate.
 */
function cmftao_menu_local_tasks($type = '') {

  if (module_exists('ctools')) {
  
    if ($primary = ctools_menu_primary_local_tasks()) {
        $primary = "<ul class='links primary-tabs'>{$primary}</ul>";
      }
      if ($secondary = ctools_menu_secondary_local_tasks()) {
        $secondary = "<ul class='links secondary-tabs'>$secondary</ul>";
      }
  }
  else
  {

    if ($primary = menu_primary_local_tasks()) {
        $primary = "<ul class='links primary-tabs'>{$primary}</ul>";
      }
      if ($secondary = menu_secondary_local_tasks()) {
        $secondary = "<ul class='links secondary-tabs'>$secondary</ul>";
      }

  }
  
  switch ($type) {
    case 'primary':
      return $primary;
    case 'secondary':
      return $secondary;
    default:
      return $primary . $secondary;
  }
}

Status: Fixed » Closed (fixed)

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

rickmanelius’s picture

Version: 6.x-3.8 » 7.x-3.x-dev
Status: Closed (fixed) » Active

This seems to have reappeared in D7. I have a vanilla install with some modules enabled and menu_local_tabs comes up blank. I can confirm it works on a vanilla D6 website. The tabs are missing for both default themes as well as custom themes (e.g. omega sub theme).

Letharion’s picture

Version: 7.x-3.x-dev » 6.x-3.8
Status: Active » Closed (fixed)

I'm actually moving this back to it's old setting. If a similar problem exists in a different major version, it could very well be something else. Also, the edit panel link exists in the contextual links, so I'm not even sure it's supposed to be there in D7. Maybe it should though, but if so, please open a separate issue, and try with the stark theme.

merlinofchaos’s picture

Yes, we moved that to contextual links and the tabs are no longer there in D7.