When I activate the placeholder menu item with "nolink" as explained for Special Menu Items the menu item shrinks both horisontally and vertically. The size will be only the exact size of the included text.

How will I be able to receive a menu where this is working as normal regarding size and drop-down functionality?

Secondly drop-down is also not working. When you place your mouse pointer over the main menu item area it only shows a small part of the second menu item becomes visible.

How do I get full drop-down menu to show?

I also tried Nice Menu then the second menu option is only half visible. The other half is hidden under the block below it (an image in the Preface top region.

Thanks for your help
Sven

I use Drupal 6.19, Superfish 1.6 and Special Menu items 1.5.

Comments

WillHall’s picture

You have to modify the module (at least that is what I do)

Currently the module inserts a span as the placeholder for nolink - and the admin interface doesn't give a viable solution for inserting a valid a tag.

SO - hackity hack hack.

Open
/sites/all/modules/special_menu_items/special_menu_items.module

look around line 97 for
if(strpos($link['href'], 'nolink') === 0) {

Change that block of code to

  if(strpos($link['href'], 'nolink') === 0) {
    // Allow if the menu link is nolink:
    $link['localized_options']['html'] = TRUE;
    
    //Retrieve tag for nolink menu item
    $tag=variable_get('special_menu_items_nolink_tag','<a>');
    
    //Set class for nolink
    $css='nolink" href="javascript: void(0);';
 
    //Return HTML span instead of a link
    return render_menu_item($tag,$link['title'],$css);
  }

Make sure that in the configuration for the module the tags is set to <a> or empty.

HTH

BlueBrumie’s picture

I had a similar problem where I needed the nolink menu item in a horizontal Superfish menu to have an arrow graphic. All I did was change the nolink tag in the Special Menu Item settings from a <span> tag to an <a> tag without hacking the module. I would give that a try, you can find it under /admin/settings/special_menu_items

As for your part visible drop-down menu that may be down to the z-index of the menu, adding to your CSS may help. What browser are you using is it the same in other browsers?

WillHall’s picture

Sure, it will work but an a without an href is invalid.

wagafo’s picture

Putting <a href=""> also works, the menu still has a link but if you keep on it it keeps you in the same page.

viseser’s picture

Hello, this is my solution for Superfish 7.x-1.8:

Line 1012 of superfish.module

$output['content'] .= l($menu_item['link']['title'], $menu_item['link']['link_path'], $link_options);

Must be modify by:

if ($menu_item['link']['link_path'] == '<nolink>') $output['content'] .= '<a href="javascript://">' . $menu_item['link']['title'] . '</a>';
else $output['content'] .= l($menu_item['link']['title'], $menu_item['link']['link_path'], $link_options);

I hope my solution will be useful.

Vicente.

Anonymous’s picture

viseser,
thanks for posting this. Helped me fix the same problem today!

grincon’s picture

Go to the special menu items configuration (/admin/config/system/special_menu_items) and replace the HTML tag for "nolink" with
<a href="#" onclick="return false;">

Anonymous’s picture

Nice, that's clean. And totally worked.