Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | zen-593290-2.patch | 1.24 KB | sfyn |
Comments
Comment #1
sfyn CreditAttribution: sfyn commentedI created a parallel issue in the Panels cue: http://drupal.org/node/593296
Comment #2
sfyn CreditAttribution: sfyn commentedHere'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.
Comment #3
sfyn CreditAttribution: sfyn commentedComment #4
JohnAlbinConsidering 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
Comment #5
sfyn CreditAttribution: sfyn commentedAwesome - that would be twice as good.
Comment #6
JohnAlbinI 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.
Comment #7
sfyn CreditAttribution: sfyn commentedNeato.
Sometime, I would be very curious to learn about this research of yours.
Comment #8
JohnAlbinWell, 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.