In the DHML module description it says:

Ordinarily in Drupal, in order to see the sub-items in a menu, you need to click the link of this item and wait for a full page load

This is what I expected and would like to happen but it just isn't working like that for some reason.

  • In Create Page > check {Provide a menu link } > select Parent item, I've allocated parent and child menu links
  • The theme I'm using (Bartik) has checked:- "Secondary menu"
  • I can't see anything under structure > menus that relates.

But after clicking the main menu item, on the next page load, child menu items don't show, and I don't know why...

Do I actually need something else, or is the DHTML description right ,and some other setting needs to be set that currently isn't?

(I'm looking at menu block but really want to keep things as pared down and simple as possible)

EDIT:
Just noticed (adding Contact) that my Navigation menu isn't showing ( in Bartik it should appear at the bottom of the pages?). Maybe this is relevant. I have secondary menu checked in all Appearance tabs.

Comments

vm’s picture

menus are blocks. Dhtml menu is set to work on specific menus in those blocks.

the sub items that the DHTML menu refers to are not secondary menus. Sub items are child links. Secondary menus are a different animal. Secondary menus are the displaying of an entirely different menu and it's menu items triggered by another menu. See: http://drupal.org/documentation/modules/menu & http://drupal.org/node/360301 & http://www.lullabot.com/videos/using-secondary-menus

talvi’s picture

Thanks VM, yes, I read both those articles before posting but still don't get it/haven't been able to fix it, hence my post here. I hear what you're saying too - but still, the secondary menu (Navigation menu) should be displaying right, and it isn't.

The only reason I noticed (this separate issue about the Navigation (?) menu) is because child menu items are not displaying in the main menu.

So, two problems now that I'm desparate to get sorted:

  1. Why don't child menu items in the main menu display when the parent menu item is selected and the page has reloaded?
  2. Why isn't the Navigation (aka secondary?) menu displaying? (users can't get at the contact form)

I'd really appreciate some help to dig myself out of this mess.

vm’s picture

My apologies for not knowing what you've read before you posted, hence my links to docs that I was utilizing while trying to research the possible causes of your issue with the limited information of your opening post. I thought it important to recognize that there is indeed a difference between "secondary menus" AND child menu items (which I think is what you are referring to as sub-items).

The following questions are pertinent:

what is set as the 'Source for the Main links'? in administer -> menus -> settings

In what region has menu that has also been designated as 'Source for the Main links' been placed?

After those questions are answered, and if DHTML is still in the mix:
How is the module configured?
Is the .js being called in the head tag of the rendered page?

I'm of the belief that you've two issues. One is a misunderstanding about how secondary menus are supposed to work. The second is a misunderstanding or misuse of DHTML menu module which isn't intended to work on a horizontal menu.

With reference to secondary menus, allow me try to visually connect the ideas behind the way it works:

secondary menu items do this: image 1 & image 2

The menu settings above are:
'Source for the Main links' = Main Menu
'Source for the Secondary links' = Main Menu

In the bartik theme, the main menu block is set to display in the menu region.
The test 2 menu item is set as a child of the test 1 menu item (parent)
When the parent is selected from the main links menu, the children (of that parent) show in the secondary links menu.

Illustrated another way using the core navigation menu with the following menu settings:
'Source for the Main links' = Navigation
'Source for the Secondary links' = Navigation

image 1 & image 2

in both of the above examples, DHTML menu module has no effect and/or impact

with reference to DHTML Menu with default settings: video 1

talvi’s picture

Hiya VM :)

....... YAAAAAY!! Thanks :) I get it. In Settings (had to go Structure > Menu > Settings tab, just for anyone else reading this): the Secondary links relate to the Secondary menu, and if both Main and Secondary links are set the same eg to Main menu, then the child items of an item selected in that menu will appear in the secondary menu (only to one level though I suppose).

BUT I only get to choose which 2 of the 4 menus shows? eg between Child items of Main menu items and eg the Navigation menu? (I've chosen Navigation as Child items just looks wacky.)

However :) .... in your vid I see two menus in the left sidebar: Navigation and Management. My layout would work great if I could get the child items to show in the place of your Management menu. (I'd leave the Navigation appearing in the top right) Can you point me at a way to do that?

to wrap previous stuff:

:) no offence VM, no way you could know I'd looked at those links before. I got them from that other thread you commented on (Jack someone's) btw.

re your original questions:
I'm using Bartik
You asked about a page.tpl.php and I guess it must be there.
DHTML was a red herring, I think. I mentioned it because of the description about the secondary menu,

EDIT:

and thanks for all the work you put into that reply :) I really do sincerely appreciate it.

vm’s picture

(only to one level though I suppose).

correct only to one level

My layout would work great if I could get the child items to show in the place of your Management menu. (I'd leave the Navigation appearing in the top right) Can you point me at a way to do that?

you would likely have to manipulate the theme as secondary links are rendered through the $secondary variable. How you would then get them into a block would have to be researched.

DHTML was a red herring, I think. I mentioned it because of the description about the secondary menu,

DHTML doesn't mention secondary menus. But that's moot provided you understand what you mean when discussing secondary menus and sub-items/child links. It's important terminology though when asking for support from others, as using either of these terms incorrectly can bring about entirely different answers.

talvi’s picture

That pretty much destroys my hope for the site structure, but thanks for the clarifications and explanations .. anyway now I REALLY need help as I've wandered into the tar pit of menus ... so:

I copied the data in the Navigation menu into a new menu, imaginitively called Navi2, (to see if I could get around the bug in setting navigation as the secondary menu). It seemed to work fine until ... I logged on as an ordinary user (not admin)... no logout button D'oh! So, shut down active logins via FF browser, logged back in as admin and went to fix the problem:

  1. Went to the menus, discovered that setting the secondary menu as other than User menu means no logout button D'oh!
  2. Decided to put the site into maintenance mode (not wanting any users to find themselves locked in!) Seemed sensible but turned out to be disastrous.
  3. Opened a new browser tab to look through the user menu data to copy data over into menu items on my Navi2 menu and ....
  4. ... the new tab opened showing the page "SITE IN MAINTENANCE MODE". The address bar showed the correct path ie to the user menu settings
  5. Realising I was in deep doo doo, I looked at the previous tab and saw the note: "go online", clicked it and ...
  6. ... yup, up came the page "SITE IN MAINTENANCE MODE".

So now I am well and truly check-mated!

Any idea how I get back in?? Or do I need to delete the whole thing and start again from scratch??

It's a bear-trap this maintenance mode thing!

vm’s picture

logout = yoursite.com/user/logout
login = yoursite.com/user/login

the above assume you've enabled clean urls.

If clean urls are not enabled:

logout = yoursite.com/?q=user/logout
login = yoursite.com/?q=user/login

in the future, please create a new thread for new questions.

talvi’s picture

Thanks ... (phew!)