Changing TABS into CONTEXTUAL LINKS I'm making a module that changes the output from the tabs (View, Edit, ...) into contextual links. The name of my module is "testmodule" and the name of the theme I'm using is "Bartik".

When I place this into my test module, it works, but only when I use the Bartik theme:

function bartik_menu_local_tasks($variables) {...}


This doesn't work

function testmodule_menu_local_tasks($variables) {...}


Any idea's?

I was also wondering if I could easily change the html made by template.php, for achieving the change of tabs to contextual links I have to change this line in template.php:

&lt;div id="content" class="column"&gt;


change into :

&lt;div id="content" class="column contextual-links-region"&gt;


I want to do this within my module...
I found a sollution to overwrite the "theme_menu_local_tasks" function.

function MODULENAME_theme_registry_alter(&amp;$theme_registry) {
    if (!empty($theme_registry['form_element'])) {
        // Menu local tasks
        $theme_registry['menu_local_tasks']['function'] = 'MODULENAME_menu_local_tasks';
    }
}