Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all, not sure if this would be a bug report or support request????
I'm using special menu items and have it working properly with my menu links so that when setting the path as "<nolink>
" it spits out plain text in the menu instead of a link. Custom breadcrumbs sees it as a valid path however.
My php is bad, I'm a newbie but I've been playing with replacing this in line 908:
if (isset($link['href'])) {
// Pass in $link as $options, they share the same keys.
$output .= l($link['title'], $link['href'], $link);
}
with
if (isset($link['href'])) {
if ($link['href'] == '<nolink>') {
$output .= '<span' . $span_attributes . '>' . $link['title'] . '</span>';
}
else
// Pass in $link as $options, they share the same keys.
$output .= l($link['title'], $link['href'], $link);
}
Any pointers? Am I even close?
Comments
Comment #1
marktheshark CreditAttribution: marktheshark commentedSupport for special menu items would be most welcome, I agree.
Comment #2
raguchi CreditAttribution: raguchi commentedSame issue here, it seems custom breadcrumbs doesn't have support for special menu item.
One solution is commented here https://drupal.org/node/1007054#comment-4842064.
jQuery: replace the
<a>
tag with<span>
if the href has the 'nolink' string.Comment #2.0
raguchi CreditAttribution: raguchi commentedadded missing "nolink" text