2

I am working on a Drupal site that has a series of about 2 dozen articles. I have a page called "News" which lists the title/teaser for each article. I would like the menu item "News" to be active as the parent of each article node, but I would like to disable the dropdown menu (No need to have dozens of articles in a dropdown). I am using Superfish and have the dropdown enabled for all other menu items. Is there any way to disable it for a single menu item? Perhaps I need a different menu module?

Any help would be greatly appreciated. Many thanks!

susanhouser

EDIT

Here is a screenshot to help illustrate:

http://screencast.com/t/3eyDuK0w

EDIT02

I ended up coming across a solution that fit my need (See answer below). Instead of setting News as the parent menu item for each article (I was doing this to generate the class "active-trail"), I used the plugin described in my answer. Thanks for all of the help!

  • Are you currently seeing content titles in your drop-down menu (Never seen that before)? If that is so, why would you do that in the first place? – frazras Jul 6 '12 at 0:17
  • Thanks @frazras. I think perhaps I have been unclear. I would like to make my article nodes children of the menu item "News" in order to have the class "active-trail" added to "News" whenever the user is viewing an article. I just do not want theses articles automatically added to a dropdown menu for "News". I have added a screenshot to illustrate. Hopefully that helps clarify! – Susan Jul 9 '12 at 14:05
1

I ended up solving my problem by setting the url pattern for Articles to "news/[node:title]". I then used Menu Trails to highlight the News menu item based on the url path.

Now the "News" link will automatically be highlighted when viewing individual articles. Hopefully that helps someone else!

0

You can configure "Menu Depth" option for that superfish block.

Also you can use css to hide the 2nd level dropdown UL

  • Thanks @gilzero. I have set the menu depth to 1 because I would like a dropdown menu for all the other links in that block. Is there a way to disable the dropdown for "News" alone? I have added a screenshot to help illustrate. Thanks again! – Susan Jul 9 '12 at 14:09
  • May be a new option, but Superfish block has now this option: <<Take "Expanded" option into effect. By enabling this option only parent menu items with Expanded option enabled will have their submenus appear.>> – vicenteherrera Jul 22 '15 at 14:03
0

The easiest way is to do it with CSS. It's dirty, it's not drupal way, but it works.

Get the ID of the <li> element of News then put:

#id-of-element ul {
  display:none!important;
}

The !important bit may not work on IE6 though, unless your page is rendered in standards compliant mode.

See this question on Stackoverflow.com, particularly the second answer by Graphain.

  • Thanks for the answer and reference! I would like to do it "the Drupal way", but I will keep this solution in mind. It may turn out to be the most practical fix. Thx again! – Susan Jul 9 '12 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.