I'm trying to seperate the primary tabs and secondary tabs, so I can basically insert them in different areas from each other. (this should be default, like primary and secondary links, IMHO)
So far I have this in a template.php
function tabs($a) {
switch($a) {
case 'primary' :
print '<ul class="tabs primary">';
print menu_primary_local_tasks();
print '</ul>';
break;
case 'secondary' :
print '<ul class="tabs secondary">';
print menu_secondary_local_tasks();
print '</ul>';
break;
}
}
Then wherever I want to insert a tab in page.tpl.php, i use the tabs() function i just defined, such as:
<?php if ($tabs != "") {
tabs(primary);
}
?>
So far everything is working, I managed to get the two tabs (primary & secondary) to appear where I want them. But there is a problem.
Whenever, for example, the secondary tab isn't available to that page, <ul class="tabs secondary"></ul>
will be inserted into the code. Since there is no secondary menu on this or that page, that UL needs to not appear. Because it does, my styles for that class interfere with the layout.
While trying to figure out where those UL and CLASS definations are coming from, I found the function theme_menu_local_tasks() in menu.inc. As a test, I changed class="secondary" to class="secondaryX". However, in the page that the webserver serves, it still says "secondary".