Hi,

I'm trying to turn dhtml-menu into a horizontal menu, which only expands on click.
I'm nearly there, but I have one problem.

The parent items are not supposed to be links on my site, I've been looking at this theme snippet: http://drupal.org/node/143322 but I can't get it to work with this module.

I've noticed this function: function dhtml_menu_item_link($item, $link_item) which is commented out in the module - can this perhaps be used somehow?

thanks!

Comments

brmassa’s picture

Assigned: Unassigned » brmassa
Status: Active » Fixed

Morten,

on theme_dhtml_menu_item() function, there is a line
return " <li class=\"leaf$active\">". menu_item_link($mid) ."</li>\n";
it calls the menu_item_link() to create the link. study how you can modify this function to not transform it into a link.

regards,

massa

robotjox’s picture

thanks, man - I managed to do it by stripping away the link tag with a few php commands - I'm sure there is a more elegant way to do it, but it works :)

Anonymous’s picture

Status: Fixed » Closed (fixed)
vipconsult’s picture

So why don't post your solution here and help other with simillar problem

vipconsult’s picture

Status: Closed (fixed) » Active
brmassa’s picture

Status: Active » Closed (fixed)

Chris,

its generally necessary for some sites. the standard behaviour, so, must be the same.

regards,

massa

vipconsult’s picture

Status: Closed (fixed) » Active

Yes , but mine needs this behaviour as well :)

I spent 3 hours , trying to figure this out , but no success yet.

Please Help !

brmassa’s picture

Status: Active » Closed (fixed)
Gus24’s picture

Version: 5.x-1.0 » 6.x-3.0

Did anyone find the solution for Drupal 6?

cburschka’s picture

The module now works in a completely different way, and what has been said above about commented out functions does not apply.

DHTML Menu has always worked and will always work with the Drupal menu tree, which so far does not support non-link items as far as I am aware.

However, it is now possible to use the theme layer to override menu link item theming, which means you can prevent items from being rendered as links if you so choose.