Hello!

The new incarnation of drupal is the best ever...
Unfortunately, I am missing a feature that was present (and very useful) in one of the addoon modules for ptrvious versons:
The custom menus had the ability to stay "open" instead of following open-by-context mode.
Am I missing something or is this 'feature' missing from the core menu module?

Thanx very much for any info.
__
BP Toni

Comments

TDobes’s picture

Yes it is missing in 4.5.

Yes it will be in 4.6. See this patch.

You could probably manually apply the patch (use the newest one) to your 4.5 installation to add the feature.

oc’s picture

We have a custom menu that doesn't seem to automatically open when you click on a triangle tab. Is this what you are talking about when you say,

"following open-by-context mode"

Secondly, when you say you could "manually apply the patch", I need to know:
a) do I need a unix shell account to apply a patch
b) If i do, what is the syntax I use to apply it?
c) If I don't, then what is the procedure to apply a patch without this; does there exist a web based "runpatch.php" file I can install in the folder where I need to do the patch, or can I download the file I need to patch and use some kind of Windows command to do it.
d) as an alternative can I just take the menu.inc file from CVS and install that -- will it fix my problem?

Thanks, I am pretty technical, but there ought to be a doc which explains this so that you don't have to be a programmer to do this.
-rc

Organizers' Collaborative -- Free Software for Activist Groups
http://organizenow.net and http://organizersdb.org

Steven’s picture

We have a custom menu that doesn't seem to automatically open when you click on a triangle tab. Is this what you are talking about when you say,

Make sure you use the real path for menu items, not the aliased path. The alias will still show up in the end result.

TDobes’s picture

oc: Nope. That's not the issue I was talking about at all.

toni was looking for menus that would stay open/expanded whether browsing them or not.

For your problem, listen to Steven's advice: use the node/### when creating menu items rather than any aliased URL's you've created. When your menu items are displayed, Drupal will automatically convert them to the appropriate aliases... and, because it keeps track of the "internal" URL's, it will expand the appropriate menu item as you would expect.

oc’s picture

I did install the patch. sure enough, on my test site

http://organizersdb.org/home

I can set the "features" link in my custom menu to "always expanded" and I see the submenu items, which are:
node/53 node/54, and node/55.

However I still can't get the submenu to expand by default when I click on the features link from my home page.

any ideas?

-rc

Organizers' Collaborative -- Free Software for Activist Groups
http://organizenow.net and http://organizersdb.org

TDobes’s picture

Read Steven's reply and my reply to you above.

Step by step instructions:
1. Go to admin->menu, edit your "features" item
2. Remove whatever is in the "path" field and replace it with "node/###"
(you can determine what ### is by going to your features page, then clicking the edit tab... read the number out of the URL)
3. click save
4. observe that it works now... and that the link displayed isn't actually that ### thing you entered, but the alias. Wow.
5. (optional) observe that it still works if you remove the patch

The node/### path is how Drupal looks at the URL. In order for the menu system to know to expand the link, you need to feed it this "internal" path. While your URL alias does get you to the proper page, the menu system is unable to figure out from that address that it should "expand" the menu and show the child items. Why? The menu system only knows about the node/### path. So... you need to talk to it in terms it can understand. Then the menu system sees the numerical path, your users see the aliased (friendly) path, and everything works (hopefully). This does seem a bit counter-intuitive, so I've put it on my "to-do" list to make a quick patch to make this simpler in 4.6.

BTW: This has drifted wayyyyy off-topic. If it still doesn't work, maybe you can create a new forum post altogether to discuss this?

oc’s picture

the good news is that everything works now. the patch works (thank you!) and also I now understand that the parent menu item has to be referenced as a node for the regular expansion to work. I was just fixing the submenu items.

Again, thanks, it looks like a good patch!

Organizers' Collaborative -- Free Software for Activist Groups
http://organizenow.net and http://organizersdb.org