I was looking for creating menu item which points to no where!!! when you are creating menu items you must put a links into the path section so the menu item on click will send you there. but what i want is to be able to leave the path section empty so the menu item will not be click able.
I searched in community and there was a solution but for zen theme. will somebody please let me know how can i change the code to work in this theme?
Here is the link for the provided solution: http://drupal.org/node/128618
and here is the solution mentioned there:(http://drupal.org/node/128618#comment-739861)

This works for me.
JDSaward - February 21, 2008 - 12:59

I'm using Zen theme and have a sub-theme.

In my template file (in the sub-theme directory) I have added a slightly re-coded version of the function:

function zen_menu_item_link($item, $link_item) {
if ($link_item['path'] == "") {
return ''.$item['title'].'';
}
else {
$tab = ($item['type'] & MENU_IS_LOCAL_TASK) ? TRUE : FALSE;
return l(
$tab ? ''. check_plain($item['title']) .'' : $item['title'],
$link_item['path'],
!empty($item['description']) ? array('title' => $item['description']) : array(),
!empty($item['query']) ? $item['query'] : NULL,
!empty($link_item['fragment']) ? $link_item['fragment'] : NULL,
FALSE,
$tab
);
}
}

I put it in my sub-theme directory and call it zen_menu_item_link rather than phptemplate_menu_item_link so that it over-rides the phptemplate_menu_item_link in the root of the zen theme.

Then I use as the URL for menu items that I want to appear as text rather than a link.

Then I theme class menu_placeholder appropriately.

It works perfectly. I do find I need to clear the menu cache sometimes to see the changes as I code.

Comments

bellagio’s picture

I am looking for the same solution, but no idea how to make it work. I read the article from your link, and put function in template.php, doesn't work.

I just want to categorize the menu without actual link or content for the category.

If anybody figured this out, please help. Thank you.

oadaeh’s picture

Status: Active » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-4.x branch.
Thank you.