Download & Extend

Add documentation to readme on how to fix tab breakage

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

Component:Miscellaneous» Documentation

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

Title:Removes span tag from tabs» Add documentation to readme on how to fix tab breakage
Category:bug report» task
Status:active» needs review

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

Status:needs review» closed (won't fix)

This module is now obsolete. Please see the module's project page.

nobody click here