Currently I'm working on a website.

It used to be static, but there was decided to add a CMS.
Unfortunately, I bumped into an issue.

I'm on Drupal 6.x, creating a Zen subtheme and I need a VERTICAL menu with VERTICAL submenu UNDER the parent link.

So

Link1 (selected)
-->Link1.1 (visible because selected)
-->Link1.2 (visible)
Link2
Link3
Link4
-->Link4.1 (invisible because not selected)
-->Link4.2 (invisible)

The structure of the menu is fine, I ordered them well in the primary menu.

The settings for menus are:
Default menu content: Primary links
Source for the primary links: Primary links
Source for secondary links: Primary links

And ofc the template (page.tpl.php):

<div id="menu">
    <?php
    print theme(array('links__system_main_menu', 'links'), $primary_links, array('id' => 'main-menu', 'class' => 'menu'));
    ?>
            
    <?php if (isset($secondary_links)) : ?>
        <?php print theme('links', $secondary_links, array('class' => 'submenuItem')) ?>
    <?php endif; ?>
</div>

As you may interpret from the script, the submenu is underneath the menu instead of fitting in its category.

How do I fix it? How do I get the 'secondary menu' implemented into the primary?

Comments

tdimg’s picture

Secondary menu, the way you set it up, only displays the child menu items of the selected menu tree.

Basically, don't use the secondary menu for what you intend and either code your own menu (not sure exactly what sort of menu you want, dropdown? then some CSS is all you need plus some javascript to get IE do the same, many tutorials on how this can be done can be found on the net) or use something like the nicemenu module.

timmetoe’s picture

It's all catagorized under the primary links so it shouldn't be a secondary menu at all.

This is the original
http://i55.tinypic.com/ku3v8.jpg
http://i56.tinypic.com/10iaqv5.jpg

As you can see, the selected link shows the children upon page refresh (so no fancy dropdown stuff)

This is the original:
http://www.salon-nouveau.nl/

The drupal version:
http://www.salon-nouveau.nl/test/

My primary menu structure:
http://i52.tinypic.com/2w6803m.jpg

tdimg’s picture

well, you can't achieve this using secondary menus (secondary links), and yes you're using them as your setting for the menus and the theme indicates.

I don't have the time right now to come up with a working solution for you though. My best suggestion is to browse through menu modules. Alternatively, as I suggested, use a proper dropdown menu like nicemenu.

timmetoe’s picture

Ok I'll have another look.

Submenu tree & nicemenu didn't really help but maybe I just didn't look well enough :>

If anyone got a solution please post them.

Edit -
I don't see why this is such a big hassle - The navigation menu in the admin panel seem to work fine (= the garland theme) :<

tdimg’s picture

if that's exactly what you want, then just replicate it, and if I remember correctly, all you would need to do for that is to not assign the primary menu as the source for the secondary links and get rid of that theme output as well.

Having said this, from a user point of view, I personally prefer something like nicemenu as it provides a dropdown menu (or flyout) and I won't have to click through pages that are of no interest to me.

timmetoe’s picture

I'll discuss it with my boss but I don't think he can be arsed to put more time in it xD

Thanks a bunch, I'll try it out first thing tomorrow!

danielhonrade’s picture

try dhtml_menu

Daniel Honrade, Jr.

Freelancer
email: danielhonrade@gmail.com