In 4.7.2, secondary links disappear in the Menu module. I think the reason is that submenus of primary links now become secondary links when the primary link is clicked on. This is a brilliant idea, but there is a small catch: you can not put secondary links on the front page, because the front page has no menu item (and consequently there can be no submenus).

Therefore, it's impossible (I think) to show secondary links on the front page. Furthermore, if all of the primary links have submenus and hence secondary links, and the frontpage doesn't, then it kinda annoying when you go back to the front page, because the menus perculate up and down.

Comments

heine’s picture

Secondary links can be a seperate menu. Go to administer >> menus to create a new menu that holds the secondary links, then go to administer >> settings >> menus to tell drupal that the newly created menu holds the secondary links.
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.

vph’s picture

Thanks. I just saw your reply now. I'll try it out.

PS: after reading carefully and exploring if it can be done, I realized that your suggestion doesn't solve the problem I have, which is similar to that of the poster below.

I want secondary links on "Home". And since "Home" is not a menu, it can not be assigned secodary links. Settings/audio allows me to assign secondary links to any menu (primary links by default). What I want is that any more, namely "Home" has secondary links, just like what used to be.

benofsky’s picture

1. It's quite obvious that you didn't search Drupal.org before posting as this question has been answered hundreds of times.
2. When someone answers you and you don't even say thankyou.

Ben
Benofsky Park.com

benshell’s picture

Sorry benofsky, but I'm looking for the answer to this question right now too, and I keep ending up on this page (using both Google and the Drupal search). If this has been answered (and I would be surprised if it hasn't been -- I just can't find it), please let me know where.

I don't know if Heine's workaround would solve the problem for vph, but unfortunately that technique won't work for the site I'm currently working on. On a site with primary links like Home, About, Photo Galleries, and Contact I need different secondary menus under each primary link. This works fine until I try to put secondary links under Home (which, of course, links to ). If I use Heine's idea I can get secondary links under Home but I can't have different secondary links under the other primary links.

It would be nice if the _menu_get_active_trail_in_submenu() function would return menu items that point to the front page when the front page is active. It doesn't look like the function was designed to do that though.

patricksettle’s picture

Maybe I'm not following what your problem is correctly. From what I see one of the standard ways of handling secondary links should work fine for you.

Lets explore...

If you would like the menu links as follows:

Home
--Sub-home page1
--Sub-home page2
About
--sub-about1
--sub-about2
Photo
--sub-photo1
--sub-photo2

Then create one menu, with three menu items, then create their sub-pages as children to them... Then set the Primary and Secondary menus to this menu you've created.

Keep in mind though, if you want the About and Photo links under Home as well, you'll need to create the Primary version of them, before you assign copies to be sub-pages of home... And with -any- of the menu items, make sure you create them in this menu first, or you'll run into problems with the menu system not knowing they have sub-pages...

The alternative way of dealing with secondary links is with it's own dedicated menu... the obvious down side to that is that every page would show the same secondary menu.

And a down side of the primary/secondary meny system is when you've got third level pages that pull such as PressRoom > News Releases > (anynewsrelease) ... the actual news release isn't part of the menu system and thus wouldn't have a menu show up. The way around it is create either a custome menu to duplicat the PressRoom sub-menu... or a custom block that automagicly pulls the secondary menu for the PressRoom item.

Hope this helps.

nasi’s picture

The problem I am having with your example above is that if the menu item 'Home' is set to a path of <front> then when you are viewing the home page the secondary menu is not displayed. It is displayed for all other Primary menu options, but not for <front>

Equally, the menu item 'Home' is not highlighted as an active menu item when on the home page unlike other menu items.

I am trying this out using 5.0 beta 2, so unless I can find a reason/solution for this behaviour I will submit it as a bug.

Robin Millette’s picture

I just stumbled upon this, it might help you:

"Change your menu declaration for "Home" (or whatever you call it) from <front> to whatever you actually have <front> set to in your site settings, such as node/1." -- source: agaric design

dietr_ch’s picture

<front> should trigger the same behaviour as the usual front page name, such as "node". This is a known bug, sadly not fixed yet.

vph’s picture

Sorry, I searched but couldn't find the answer.

matt@antinomia’s picture

1. How is it obvious? I am unable to find the answer to this question after googling and drupal search.
2) He did say thank you.

Take a chill pill...