Simple Pages=>Modifying Navigation in Header

How do I customize the header and footer navigation to control which simple pages appear and in what order?

In my themes common header and footer, I have the following defined:

<?php echo public_nav_main(array( 'Library Home'=>uri('../'),'Collection Home' => uri('../34th_st/'), 'Browse Items' => uri('items'))); ?>

And see this in the plugins plugin.php page:

function simple_pages_public_navigation_main($nav)
$pages = get_db()->getTable('SimplePagesPage')->findAll();
foreach ($pages as $page) {
// Only add the link to the public navigation if the page is published.
if ($page->is_published && $page->add_to_public_nav) {
$nav[$page->title] = uri($page->slug);
return $nav;}

and this in the show.php page:

<?php head(array('title' => html_escape($page->title), 'bodyclass' => 'page', 'bodyid' => html_escape($page->slug))); ?>
<div id="primary">
<h1><?php echo html_escape($page->title); ?></h1>
<?php echo eval('?>' . $page->text); ?>
<?php echo foot(); ?>

but do not understand how all pieces fit together.

So I do not understand how simple pages gets added to the navigation. Please advise.

The function public_nav_main() adds simple pages automatically in the order they are added to your site. If you would like to take complete control over how the navigation appears in the header and footer, you should replace public_nav_main() with the helper nav(). nav() will not, however, add any pages automatically, so you will have to manually add each link you want to appear. For example:

<?php echo nav(array('Library Home' => uri(''), 'Simple Page Name' => uri('simple-page-slug'))); ?>

This allows you control over what simple pages appear, and in what order.

Thank you, this is quite helpful.

I used nav (), and it is quite useful. However, it appears that if I set Exhibit is public to "No," nav () is not able to 'transcend; the masking and unable to see the exhibit.

The question, I guess, becomes how to supress "Browse Exhibits" generated by Exhibit Builder, but still be able to access exhibits using nav ()?