Greetings,

When I create a Panel page, I don't see an local tasks (View, Edit Panel, Devel, etc). This is true for Rubik and Cube themes as well. When I change the theme to Fusion every thing works fine.

Any thoughts or suggestions? The only thing I could find is http://drupal.org/node/789546.

Hope that helps

Comments

gmclelland’s picture

any thoughts on this?

gmclelland’s picture

A little more info on the subject: http://drupal.org/node/816056.

gmclelland’s picture

Just curious if anyone supports this issue queue? It's hard for me think that 4,500 sites uses this base theme and none of them use Panels.

gmclelland’s picture

For anyone else needing a fix: I put 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;
  }
}

chriscalip’s picture

WARNING! comment #4 will break your site for anonymous users. that code has a bug that needs fixing.

chriscalip’s picture

Follow up, this code has the fix:

/**
* 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')) {
    ctools_include('menu');
    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;
  }
}
gmclelland’s picture

Seems to work, thanks.

pdcarto’s picture

Has anyone got a D7 fix for this? The ctools_menu_primary_local_tasks() and ctools_menu_secondary_local_tasks() functions are not implemented in ctools 7.x-1.x, so #6 does not work.