Creating Dropdown menus with the primary nav

I've been asked if I can create some dropdown menus from our primary nav. I know how to do this with regular unordered lists. However, I don't know how to do this using the php array for the primary nav that Omeka uses.

Here's the code I'm using now:

<div id="primary-nav">
                <div class="tab_navigation">
                <?php echo public_nav(array('Explore Art' => uri('explore'), 'Share Lessons' => uri('overview'), 'Resources' => uri('glossary'), 'About' => uri('about'))); ?>


And here's an example from the development site of what the tabbed primary nav looks like:

I'm a php newbie so as simple an explanation with an example would be appreciated. Thx.

Related: can you tell me where in Omeka the public_nav function is defined?

The public_nav function is defined in application/helpers/LinkFunctions.php.

As for your question, do you simply want to make tabs, or a drop down menu with other navigation links? The two are different things. Tabs would involve changes to your cascading style sheet to achieve the look you want. A dropdown menu would involve some JavaScript to create the 'drop down' behavior when you hover over it to reveal more options. I don't see any dropdown menu on the African-American Art site, but do see tabs.

public_nav wraps each link in its array with a list item (li) and a link tag. So, it ends up making a regular unordered list, with each list item derived from the array in public_nav. See the example on the public_nav Codex page for some details.