Drupal Menu Thingy

25 views
Skip to first unread message

Philip Norton

unread,
Sep 10, 2013, 5:42:27 PM9/10/13
to nw...@googlegroups.com
Hi All,

I remembered today that I had asked this question at one of the meetups a while ago but got nothing but blank stares, so I thought I would ask here :)

So the problem that keeps occurring is essentially that Drupal doesn't support having more than one link to a page within the menu system. You can create the pages and they will load when called upon, but Drupal can't tell what to do with the page. The problem is that it doesn't know which menu path to activate.

You can test this yourself. Try the following:
- Make a simple Drupal site with a menu structure a couple of pages deep. 
- Then add a page to the root of the menu system.
- Obviously you can't add a second menu link from within the node edit screen (although there is a module for that) so go into the menu system and add a link to the same page to the bottom 'rung' of the menu system.
- Now, when you navigate to the main menu item you will probably be looking at the page as it would be at the bottom of the menu structure. I say probably as sometimes, if the moon is in the right phase, you can save these two menu items and they won't clash horribly.

It doesn't have to be a single content page with two links here, you can achieve the same effect if you create a view and treat it in the same way.

I don't want to get into a discussion about AI design and why I should probably look at the site structure first before trying to solve this. The basic truth it that this sort of thing does crop up from time to time and solving it is a pain. Context doesn't fix it, and menu set active trail hacks don't work that well.

Essentially, fixing this issue revolves around the following:
- Creating a redirect from a dummy page to the real page.
- Hard coding a menu item into the menu system using the theme template overrides (this is as ugly as it sounds).
- Living with it.

As I said in the meetup there are a couple of issue queues on d.o. that have hundreds of comments, with no positive outcome. I therefore don't think that rewriting the menu system for Drupal7 is a viable fix, or worth talking about here :)

So, any ideas? The only one that springs to mind is to create a module that adds menu links that soft link to other pages. I would love to hear what everyone else thinks.

Thanks,

Phil

Mike Carter

unread,
Sep 11, 2013, 3:58:28 AM9/11/13
to nw...@googlegroups.com
Hi Phil,

You've already mentioned the way I've fixed it in the past - using a redirect. Bit of a hack around.

Is this problem on the node edit side also related to the 7.x bug about sort order when requesting paths for a page?

- Mike

pixel8

unread,
Sep 11, 2013, 5:00:35 AM9/11/13
to nw...@googlegroups.com
Drupal 6 or 7? I've been looking here:

I'm sure I've not had this issue but then again my menu links were in separate menus i.e. when you have a secondary menu in the footer and some of the links go to the same place as the main menu i.e. "contact us"
Reply all
Reply to author
Forward
0 new messages