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); ?>
</div>
<?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.