This patch allows modules to pass in custom local tasks. Pretty much, it removes hard coding of if ($primary = menu_primary_local_tasks()) { which allows modules like Views to use local tasks as tabs. While we're at it, we might as well make phptemplate_body_class more universal as well

Comments

dmitrig01’s picture

StatusFileSize
new7 KB

New patch. Fixes some notices, and much more testing. Tested in every theme, on pages with no tabs, only primary, and both.

dmitrig01’s picture

Title: Allow custom local tasks » Allow links to look like local tasks

Here's a better description: The views 2 module will provide fake ajax tabs in the administration interface. We want them to look just like local tasks. At the moment, it's not really possible. However, with this simple change, it's really easy.

dmitrig01’s picture

StatusFileSize
new7.19 KB

Bdragon suggested some stuff in IRC

dmitrig01’s picture

StatusFileSize
new7.2 KB

missed something

bdragon’s picture

Status: Needs review » Reviewed & tested by the community

Tested this with all core themes, looks good.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Hm.

- why would chameleon only print the primary local tasks?
- why not include the default local task retrievals in the theme function and let it be overridable if you want it to
- why complicate the body class function? The point of having these tpl.php files is to have them simple not to introduce conditionals for such simple things as the body class
- functions like garland_preprocess_page() still have the default tab list data used... how does this interfer with your custom tabs, if they are related at all?

dmitrig01’s picture

a) uh, because I haven't implemented it yet :D
b) possibly. Still thinking about this one
c) because we might as well make that accessible to modules
d) it does not. Custom tabs are for tabs appearing in *other places*

chx’s picture

Version: 6.x-dev » 7.x-dev
Category: task » feature
Priority: Critical » Normal
StatusFileSize
new2.1 KB

Incomplete work. But there is no way this is D6 or critical.

birdmanx35’s picture

Bingo: Still works against HEAD.

Jaza’s picture

Version: 7.x-dev » 8.x-dev

Could still be useful. But still needs work. Bump.

mgifford’s picture

Issue summary: View changes

So should this issue just be closed? It's seen no movement since 2010.

bradjones1’s picture

Assigned: dmitrig01 » Unassigned
Status: Needs work » Closed (won't fix)

I'm not against that... also I suspect the menu system has changed a bit in 8.x and this was bumped forward out of process, not because the patch necessarily applies to 8.x. Unassigning as well.