Hi, after playing a bit with crumbs module I've found a minor issue which could be fixed quite easily: links generated on the breadcrumb trail doesn't always have a "title" attribute set. It looks like only the latest item (usually the current page) has the "title" attribute.
Currently I've fixed this problem with a simple change on the buildBreadcrumb() function from BreadcrumbBuilder.php
I've changed the following line:
$item['link_options'] = array();
With:
$item['link_options'] = array('attributes'=>array('title'=>$title));
But this fix just suits my needs. Eventually this behavior could be improved adding an option or the use of tokens for the title attribute like "custom breadcrumb" module does.
What do you think about?
Thanks for the attention.
Comments
Comment #1
donquixote commentedHi,
I thought about this as well.
As a first step, we could indeed just set the title itself as the title attribute.
The next step could be to use the description of the menu item, if there is a menu item for this breadcrumb.
Or the "description" of the router item set with hook_menu() (almost no module does this, afaik)
And then as a next step, every crumbs plugin could have an opinion what the description should be. This introduces a little problem, because the plugin that "wins" on the description might not be the same that "wins" on the title. Or the parent.
-----------
So, I'd say, as a quick fix, just implement the fix you mentioned.
Then a follow-up discussion for the more complex solution.
Comment #2
donquixote commentedPatch?
Prerferably on 7.x-2.x
Comment #3
donquixote commentedComment #4
finex commentedHi, I've created a patch for the current -dev version.
Comment #5
finex commentedHi, would be possible to include the patch on the module? Thanks :-)
Comment #6
donquixote commentedAdding "tooltip" in the title for in-site and off-site SEO.