Is there a way within the interface for this theme (configuration settings) that will allow you to edit the horizontal menu bar? My primary links can be added to this menu bar, but the "home," "primary," and "Drupal" buttons remain the only buttons present on the menu bar. The primary links come down in a dropdown menu from "primary." This is a great theme, by the way! Thanks for porting it.

CommentFileSizeAuthor
#14 screen_1.png32.08 KBdalin
#13 Sans titre 2.jpg180.99 KBpatchak
#12 primary_menu.diff.txt887 bytesdalin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Heine’s picture

Not at the moment; you'll have to edit page.tpl.php.

      <?php print theme('nav', '<a href="' . url(NULL, NULL, NULL, TRUE) . '">Home</a>', array(), 'first' . ($is_front ? ' active' : '')); ?>
      <?php if ($primary_links): ?>
      <?php print theme('nav', '<a href="#">YOURTEXT</a>', $primary_links); ?>
      <?php endif; ?>
      <?php if ($secondary_links): ?>
      <?php print theme('nav', '<a href="#">YOURTEXT</a>', $secondary_links); ?>
      <?php endif; ?>
    </ul>

(as you can see I deleted the Drupal button)

rkerr’s picture

Yeah, I couldn't think of a better way to solve that in 4.6 and retain the dropdowns.
(It was mostly so I could test and make sure the dropdowns work)

What you can do to get one level of menus without dropdowns is to do this:

foreach ($primary_links) as $pl) {
  print theme('nav', $pl);
}

Now that 4.7 uses the menu system for its links, there is the potential to have the multi-level stuff work properly.

inteja’s picture

I am interested in 4.7 Mollio muli-level drop-down menus. How would this best be accomplished?

I had just thought of doing a recursive foreach as above, but is there another way or is it already planned for the Mollio theme?

Brian.

rkerr’s picture

The 4.7 primary/secondary links don't work exactly as I had thought (they only print one level of the menu each without children), but instead what could potentially be done is to add the "primary links" menu to the "header" region instead. Although I have not yet updated the CSS to propery theme that.

yogayak’s picture

I'm also very intersted in having the horizontal links have drop downs (as on the non Drupal exemples of Mollio)

I'm using Mollio on http://yogayak.com/drupal/ but feel blocked somewhat by not knowing how to make those drop downs work.

Perhaps this was explained here but I'm afraid I'm too much a newbie at Drupal and css to understand clearly.

love and light

rkerr’s picture

Status: Active » Fixed

If you put the "primary links" menu block into the header region of the page, and disable the normal primary/secondary links .. then set all the sub-menus of your "primary links" menu to be expanded, this should work as you want it to.

deanloh’s picture

Rokerr

Can you explain further what you meant by "...disable the normal primary/secondary links"?

deanloh’s picture

Okay I got it figured out right away. For the benefit of others who got stuck at having the top navigation to show up in 4.7. Here's what you need to do:

Under "administer..."
1. Under "blocks", enable "Primary links", set placement to "header"
2. Go to "menus", add your navigation items under "Primary links"
3. Go to "setting..." then "menus", under "Menu containing primary links" select "No primary links"
4. Make sure under "Menu containing secondary links", "Primary links" is selected
5. Save and look at the top of your page

dalin’s picture

Status: Fixed » Active

Ok, I'm really confused here. If I repeat the steps above I get my primary links in the html at the end of the header div as expected:

<ul>
<li><a href="/beta/values" title="">Platform &amp; Message</a></li>

<li><a href="/beta/get_involved" title="">Grow the Party</a></li>
<li><a href="/beta/community" title="">Green Community</a></li>
</ul>
 </div>

 <div id="content-wrap">

But how exactly is the CSS supposed to style this? The CSS file mentions the id #nav. But shouldn't it be pointing to something like #header ul ???

It looks to me like the CSS hasn't been modified to work with Drupal.

dalin’s picture

Ok, I may have jumped to conclusions with the "It looks to me like the CSS hasn't been modified to work with Drupal." I see that template.php is doing the work to make that #nav, .first, .last ids and classes. But for some reason, my primary links aren't getting the treatment.

I'll have to investigate further.

doeki’s picture

You'll need to modify the MOllio style.css file to get the nifty 'dropdown' menus to work:

Simply replace all instances of #nav with #header .menu as such:

#header .menu, #header .menu ul {padding: 0;margin: 0;list-style: none}
#header .menu {font-weight:bold;height:2.09em;font: bold 96% arial;margin: 0 105px 0 40px}
#header .menu li {position:relative;background: #999;float: left;width: auto;display:block;margin: 0;border-bottom: 3px solid #666;border-right: 3px solid #252525;padding:0}
#header .menu a, #header .menu a:link, #header .menu a:visited, #header .menu a:hover, #header .menu a:active {text-decoration:none;cursor:pointer;color:#fff;display: block;padding: 4px 10px 2px}
#header .menu a:hover {color:#000}

#header .menu li ul {border-left: 1px solid #c00;background: #f6f6f6 url("images/featurebox_bg.gif") no-repeat 100% 100%;width:15.8em;font-size:90%;margin-top:3px;position: absolute;font-weight:normal;left: -999em}
#header .menu li:hover ul, #header .menu li.sfhover ul {left: 0;z-index:99999}

#header .menu li li {background:none;float:none;border:none;border: 1px solid #999;border-top:1px solid #fff;border-right:none;border-left:none;padding-left:0}
#header .menu li li.last {border-bottom:none}
#header .menu li li a, #header .menu li li a:link, #header .menu li li a:visited, #header .menu li li a:hover {color:#000;padding: 3px 10px 2px;width:14em}
#header .menu li li a:hover {color:#fff;background:#c00}

#header .menu li.active {background: #c00;border-bottom: 3px solid #c00}
#header .menu li.active ul {border:none;background: #c00 url("images/featurebox2_bg.gif") no-repeat 100% 100%}
#header .menu li.active a:link, #header .menu li.active a:visited, #header .menu li.active a:hover, #header .menu li.active a:active {}
#header .menu li.active a:hover {color:#000}

#header .menu li.active li {border:none;border-top: 1px solid #c15c5c;border-bottom: 1px solid #870000}
#header .menu li.active li.last {border-bottom: none}
#header .menu li.active li a:link, #header .menu li.active li a:visited, #header .menu li.active li a:hover, #header .menu li.active li a:active {color:#fff}
#header .menu li.active li a:hover {background: #666 url("images/sprites.gif") repeat-x 0 99%;color:#fff}

#header .menu li.active li.active a:link, #header .menu li.active li.active a:visited, #header .menu li.active li.active a:hover, #header .menu li.active li.active a:active {color:#fff;font-weight:bold;background: #666 url("images/sprites.gif") repeat-x 0 99%}

/* --------------------- */

/* hide from IE mac \*/
#header .menu li {width:auto}
/* end hiding from IE5 mac */
dalin’s picture

Status: Active » Reviewed & tested by the community
FileSize
887 bytes

There's an easier way:

How to configure the top navigation:
- Put the primary links block into the header region.
- Under admin>>menus set sub-menus of the primary links to "expanded".
Do this for one level of menus only. All submenus on the second level
must remain collapsed.
- Under admin>>settings>>menus set
Menu containing primary links: None
Menu containing secondary links: Primary Links

Here's a patch for README.txt to include the more detailed instructions.

patchak’s picture

FileSize
180.99 KB

Hi,

I tried the trick that you mentionned, so I installed primary links in the header region, then I changed the primary links to "no primary links" in settings/menus, I also installed 'primary links' in the secondary links location dropdown in the same configuration page...

I added some links to te primary links in the admin/menu page, and the result is not really what I was expecting... What I want is to have each primary link (5-6) to have buttons on the top menu and then users can see the submenus for each...

Check out how it turned out on my test site, is it normal?? Thanks.
** screenshot attached

dalin’s picture

FileSize
32.08 KB

This screenshot shows what I get when I followed the instructions in my patch.

inforeto’s picture

Check again those steps as it looks primary links aren't being found in secondary links.
I'm not sure why this should be that way but there's related threads:

http://drupal.org/node/63814

http://drupal.org/node/85669