I know this issue was discussed in several posts for the D6 version of Taxonomy Menu:
#771266: Allow suppression of tooltip / popup / link title text on menus
#372324: Ability to turn off description,
but it doesn't seem to be solved in the latest version for Drupal 7?

Other than commenting out lines 567-568, is there a solution?


    //'options' => array('attributes' => array('title' => trim($item['description'])
     // ? $item['description'] : $item['name'])),

It appears that this issue is being discussed here as well:
#1237258: Over writing descriptions
#1268406: Please help how to get rid of "mouse-over" text echoing description of menu term.

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dstol’s picture

I'm curious about what your use case is here. How are you using the description field?

And to answer your question, that's a good solution for the moment.

minneapolisdan’s picture

Thanks for the reply. I'm using the Description field in Taxonomy to hold 'category' descriptions, for an online store. So, one to two paragraphs are in each description. And by default then, 1-2 paragraphs get assigned as a Title for each of menu items.

dstol’s picture

Would you rather have the description truncated, would you rather have the term name as the description, or do you have another suggestion?

minneapolisdan’s picture

Good question. I guess it would be nice to just use the Term Name as Title. I know someone else pointed out that this solution would be redundant, having the HTML Title tag be the same as the Menu Title, but I don't think having the Description field is any better, given how I (and I'm guessing) and a number of other people are using the Description field.

That's my vote.

chriscalip’s picture

another vote for "dont use description" on menu title tags

johnv’s picture

IMO 'Description in Menu Title Tags' is a nice feature. Please do not remove completely, a checkbox would be nice.

kruser’s picture

This is actually really bad if you use HTML in the tax description fields. I just troubleshot a "Fatal error: Unsupported operand types in common.inc on line 1592" in D6, which was caused by having a non breaking space ( ) in the description.

Nevermind I found the "Do not create title link attribute." checkbox on the Vocab edit page.

minneapolisdan’s picture

Kruser,

I gave a temporary fix at the beginning of this post, with which lines to comment out of your code. This is for Drupal 7, however, there are patches available for Drupal 6, I gave the links to those too. By the way, I had encountered that same error that you are referring to, in D6, because of a non breaking space in the description.

chriscalip’s picture

Anyone wants a working patch of this feature modification; patch attached. Patch just removes the 2 lines -- does not provide settings as request by #6

dstol’s picture

Assigned: Unassigned » dstol
grossmann’s picture

With the possibility of fieldable taxonomys I would like to see a simple select box where I can define which field should go as title. This could be appear on the edit vocabulary page (With the other configuration of taxonomy menu). As choices there should be:
-none-
-description field- (could be default because every taxonomy has this one and would serve in 80% of the use cases)
-any other (text)field on the vocabulary-
So this can be configured on a per vocabulary base. If -none- is selected it also should be possible to just edit the description field of the corresponding menu item because it will not be overwritten.

An other possibility would be a programaticaly generated -title- field on all vocabularies where the user can add a title text. This is the more general way but can be a bit over the top if I only need a taxonomy menu for one vocabulary and have ten others for which no menu is needed.
grossmann-mcs

dstol’s picture

@grossmann-mcs, I second your opinion but there is a long way to go before taxonomy_menu even supports using the field storage api. At the moment there is still a dependency on SQL backends.

moniuch’s picture

Fully agreed. Having the description as title hugely depends on a particular setup. Wherever description contains long structured text, the effect is between tragic and comic. Checkbox definitely, please.

Anonymous’s picture

I would also like to have title attributes from taxonomy terms as an optional feature, not a default. Or some way to turn it off in the user interface. Thank you!

schmook’s picture

Thank you for a time and effort!

It would be nice to have an option for the titles of the menu items. I changed lines 567-568 to include the name as the title:

    'options' => array('attributes' => array('title' => trim($item['name'])
     ? $item['name'] : $item['name'])),

Are there any problems with this solution?

moniuch’s picture

Strange, the patch from #9 works for one menu but not another...

anou’s picture

Hello,
First of all, thanks for this module.

For accessibility reasons, if we put the term name has the title attribute of the menu item, it should be customizable.
And I think also the description has nothing to do in the title attribute. It should be use only for the taxonomy term page.
I must mention that with this behaviour (setting the title attribute with the term description), it breaks my multilingual taxonomy...

jdanthinne’s picture

Status: Active » Needs review
FileSize
2.26 KB

Hi.
I've written a small patch.
It adds two options to add descriptions or not to vocabulary and terms items.
NB : you need to rebuild the menu after changing those options in order to see the changes.

Status: Needs review » Needs work

The last submitted patch, remove-taxonomy-description-in-menu-title-tags-1283914-18.patch, failed testing.

jdanthinne’s picture

Status: Needs work » Needs review
FileSize
1.65 KB

Updated patch

BuFr’s picture

Thanks jdanthinne, works for me.

greta_drupal’s picture

Thank you for this! In the details, you indicate this is for branch "Taxonomy menu - 7.x-1.x".
However, the line numbers do not match up to my 7.x-1.2 module file. I could manually match this up wherever the code exists, but just want to confirm for which version the patch works. This issue is filed under -dev branch.

TY.

jenlampton’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies to the git checkout for me, but not to the -dev release from the module page (for whatever reason).
Thanks for the fix!

Barrett’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

maximpodorov’s picture

Status: Closed (fixed) » Active

Please add the option to completely drop the title attribute of menu items. Popup title repeating item name can be treated as a broad joke.

dstol’s picture

Status: Active » Closed (fixed)

Great idea, can you open a new issue since it's a new feature request? Thanks!

carajito’s picture

Status: Closed (fixed) » Needs work

My problem is:

I will delete the title on my menu, but when I create a new content then the menu link take the title again. Will be fine if we can edit the configuration to show or not the description taxonomy on the menu link

Barrett’s picture

Status: Needs work » Closed (fixed)

@carajito, The issue you're reporting is unrelated to the issue addressed here. Please open a new ticket if you need help.

hles’s picture

Assigned: dstol » Unassigned
splash112’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Closed (fixed) » Needs review
FileSize
1.63 KB

Reopening, ported patch in #20 to 2.x-dev

Please test

splash112’s picture

Issue summary: View changes

better links to issues.

  • Barrett committed 6f5a505 on 8.x-3.x authored by jdanthinne
    #1283914: Applying patch from comment 20 to change handling of...
  • dstol committed 7f873bf on 8.x-3.x
    Merge branch '7.x-1.x' of git.drupal.org:project/taxonomy_menu into 7.x-...
dstol’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

The Drupal 6 version is no longer supported