Panels provides a panel edit first level local task tab.

With the existing dev release, This tab does not appear in zen or any zen sub-theme - with garland on the same site, we do not have this problem.

#2 zen-593290-2.patch1.24 KBsfyn
Members fund testing for the Drupal project. Drupal Association Learn more


sfyn’s picture

I created a parallel issue in the Panels cue:

sfyn’s picture

Assigned: Unassigned » sfyn
Status: Active » Needs work
1.24 KB

Here's a simple patch that introduces support for the ctools local_tasks functions into the core zen template.php file. The implementation defaults to the drupal core functions if ctools is not present. Since I am unsure that the zen team/users desire to incorporate this functionality, I'm flagging this as needing work.

sfyn’s picture

Assigned: sfyn » Unassigned
JohnAlbin’s picture

Priority: Normal » Critical

Considering Panels/ctools and Zen are both heavily-used projects, getting them to work together without users having to hand-edit php is important.

The patch in #2 is okay, but I want to try my hand at getting Panels to handle the issue on its end. Because its better to patch CTools then it is to patch every single theme that overrides theme_menu_local_tasks(). :-p

sfyn’s picture

Awesome - that would be twice as good.

JohnAlbin’s picture

Title: Panel edit tab not working with Zen » Chaos Tools/Panels edit tab not working
Status: Needs work » Fixed

I did some research and discovered just how much I hate theme_menu_local_tasks. :-p

I tweaked the patch in #2 slightly and committed it. Thanks, sfyn! You're in the CHANGELOG. :-)

Fixed in 6.x-2.x-dev and 6.x-1.x-dev.

sfyn’s picture


Sometime, I would be very curious to learn about this research of yours.

JohnAlbin’s picture

Well, it was eyeball research (i.e. stare at the code). Plus the years of experience I've had with theme functions.

Good theme functions are passed data and manipulate it and output markup. This allows modules to alter the data via preprocess functions (in D7 anyway, D6 modules can only alter data passed to templates) and allows themes to override the markup by overriding the function/template. And both module and theme are happy.

theme_menu_local_tasks(), on the other hand, isn't passed any data and grabs its data directly from the database (via menu_primary_local_tasks and menu_secondary_local_tasks). That means the only method that both module and theme have to affect the output is to override the function/template themselves. And since only one of the overrides will be the active override, the other is SOL.

Status: Fixed » Closed (fixed)

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