nav() container

How can I modify the HTML output of the nav() function? Specifically, I'd like to remove the
<ul> container.

Also, where can I look at the source for the nav() function in Omeka's core? For some reason, I can't find it.

Thanks -- E

Why do you want to remove the ul? If you're looking to replace it with a version with an id or class, you can do that more directly.

The source for nav, as with all the global functions, is in application/libraries/globals.php. But, the underlying implementation is almost entirely Zend's Navigation Menu helper.

While you can usually treat nav() as returning a string, it actually returns an object, so you can call the methods listed on that documentation page I linked to, like:

echo nav(/* ... */)->setUlClass('someclass');

Basically, I'm just combining two menus, one of which will be dynamically generated, to create a partial list of pages. Something like this will work for now:

echo '<div id="sidebar-pages">';
    echo '<h3>Pages</h3>';
    $navArray = array(
    array('label'=>'Items', 'uri'=>url('items')),
    array('label'=>'Collections', 'uri'=>url('collections')),
    array('label'=>'Exhibits', 'uri'=>url('exhibits'))
    );
    $mainPages = $navArray;
    $otherPages = otherPagesArrayFunction();
    $new =array_merge($mainPages,$otherPages);
    echo nav($new);

 echo '</div>';

I suspect there is a way to generate multiple menus in Omeka 2.0 via admin/theme configurations, but I haven't found it yet so this is my short term solution.

Depending on what you're working on and how things are set up, you might also be able to achieve this with a filter. Optional second param to nav() is a string name the the filter. So, you could add a filter that does the work of the otherPagesArrayFunction() you're thinking of.