Posted by smd_ksu on August 14, 2009 at 9:54pm
Jump to:
| Project: | Menu Class |
| Version: | 6.x-1.0 |
| Component: | Documentation |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Adding the function to the template.php file removes the span tags from admin tab links causing the styling to mess up. So instead of:
<div class="tabs">
<ul class="tabs primary clear-block">
<li class="active">
<a class="active" href="#">
<span class="tab">View</span>
.....You get:
<div class="tabs">
<ul class="tabs primary clear-block">
<li class="active">
<a class="active" href="#">View</a>
......This messes up the default styling as the span tag is used in the CSS.
Comments
#1
I had the same issue using the Zen theme and and the menuclass module. To fix it you can integrate both Zen and menuclass' implementations of theme_menu_item_link() in your template.
function phptemplate_menu_item_link($link) {
//let menuclass add it's classes
if (function_exists('menuclass_to_link')) {
menuclass_to_link($link);
}
// If an item is a LOCAL TASK, render it as a tab
// (add the span to tabs)
if ($link['type'] & MENU_IS_LOCAL_TASK) {
$link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
$link['localized_options']['html'] = TRUE;
}
return theme_menu_item_link($link);
}
#2
This is a good fix. Since it only affects one theme (albeit a theme lots of people use and theme on top of) could this be added to the README.txt documentation?
#3
Not sure if this module is still being developed, since there hasn't been a release in more than a year, but bumping this task up the list...
#4
This module is now obsolete. Please see the module's project page.