Can you please tell me how I can make the primary links menu in the grey bar into a nice menu (drop down)? The region for the grey bar does not seem to be defined...

Comments

Alan Cooney’s picture

Assigned: Unassigned » Alan Cooney
Status: Active » Fixed

Yes, change the following in page.tpl.php:

    <?php if (isset($primary_links)) { ?>
      <div id="primary">
        <?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist')) ?>
      </div>
    <?php } ?>

To:

    <?php if (isset($primary_links)) { ?>
      <div id="primary">
        <?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist')) ?>
        <?php print $primary_region ?>
      </div>
    <?php } ?>

And add the following to template.php:

function forest_floor_regions() {
  return array(
    'left' => t('left sidebar'),
    'right' => t('right sidebar'),
    'content' => t('content'),
    'header' => t('header'),
    'footer' => t('footer'),
    'primary_region' => t('primary links region'),
  );

}

Alan Cooney’s picture

Note: for some reason the last } was placed outside the code, put it back in to terminate that function.

Alan Cooney’s picture

Status: Fixed » Closed (fixed)
albunix’s picture

Greetings,

I have done 2 steps as shown from you

1) changes in the following in page.tpl.php
2) add on to template.php

I am wondering, is there anything else at all that one ought to do in order
to get drop down menus in the Forest Floor theme?

I'm trying to put a site together for a friend at this URL
http://visapa.com

Is there any editing of the .css file I ought to be doing etc.

Please explain in simple terminology, as I haven't' kept up with drupal in quite a long time.

Thanks.

albunix’s picture

Status: Closed (fixed) » Active

Hello,

I apologize, but I did not change the actual status to 'active'
Again, this is not a bug/error just inquiry on how to do things.

Thanks

GaryTorello’s picture

I'm also trying to do this.. following the instructions above and then activating the block in the "primary Links region" gives me a second row menu beneath the existing. ugh

Alan Cooney’s picture

Status: Active » Postponed (maintainer needs more info)

Yes you need to add the nice menu block to that region and then disable the primary links on the theme. Alternatively, I have seen a better solution is to use the following:

<?php print theme('nice_menu_primary_links') ?>

To replace:

<?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist')) ?>

This can then be styled accordingly (have a look at http://drupal.org/node/185543 ).

Let me know if you are still having problems with this.

Alan

GaryTorello’s picture

Version: 6.x-1.6 » 5.x-1.5

Thanks! Although you'll have to pardon a newbie question... What I'm looking to accomplish is to have the nicely styled gray primary bar that comes with Forest Floor turn into a dropdown menu.. will this accomplish that or do I have to do additional styling or other stuff?

If so, a step-by-step walk-thru would be GREATLY appreciated.

TIA!

ErwinROw’s picture

Hi there,

I'm trying to do the same. I wanna make a rollover menu in forest-floor of the primary links, did the 2 steps but it doens't work.
Please help me...I'm new with this :-(

ErwinROw’s picture

Can I just add the code at the bottom of the template.php ? I do something wrong...

Alan Cooney’s picture

GaryTorello - you will need to add more css to the module, or switch its style away from default so that the theme styles are used.

Erwin - Please put it in page.tpl.php as described.

Alan

Alan Cooney’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Abhaya’s picture

Version: 5.x-1.5 » 6.x-1.6

hi !
Still could not fixed the problem i follow both ur steps but there is nothing on that section could you please help me out !

Famous4’s picture

Hi All,

I just started with drupal and using this theme aswell.
I am cracking my head to get the dropdown menu (sub menu below example About Us in grey navbar)
It is working by primary links, in theme its placed automatically there, which is nice, but by sliding a menu item bit to the left in Primary links settings will not show it.

Can someone tell me what i need to do in simple step by step cause am really stuck.

Thanks to all!