Exhibit Navigation


I'm trying to alter my exhibit show page so that only the child pages show up in the navigation (as I only have one exhibit). I've had no success fiddling with the code so far--here is what I have:

echo head(array(
    'title' => metadata('exhibit_page', 'title') . ' &middot; ' . metadata('exhibit', 'title'),
    'bodyclass' => 'exhibits show'));

<h3>What was it like to be disabled in the nineteenth century?
Here, you can discover the technologies, institutions, and texts that
shaped the lived experience of disability in the nineteenth century.</h3>

<nav id="exhibit-pages">
    <?php echo exhibit_builder_page_nav(); ?>

<nav id="exhibit-child-pages">
    <?php echo exhibit_builder_child_page_nav(); ?>

<?php exhibit_builder_render_exhibit_page(); ?>

<div id="exhibit-page-navigation">
    <?php if ($prevLink = exhibit_builder_link_to_previous_page()): ?>
    <div id="exhibit-nav-prev">
    <?php echo $prevLink; ?>
    <?php endif; ?>
    <?php if ($nextLink = exhibit_builder_link_to_next_page()): ?>
    <div id="exhibit-nav-next">
    <?php echo $nextLink; ?>
    <?php endif; ?>
    <div id="exhibit-nav-up">
    <?php echo exhibit_builder_page_trail(); ?>

<?php echo foot(); ?>

And here is the public page: http://www.nineteenthcenturydisability.org/exhibits/show/discover/discover/places
(I'd like to make the two discover nav tabs disappear, but keep the others).

Thanks so much!


I think that these changes will have the effect you're looking for.

In ExhibitBuilder/helpers/ExhibitPageFunctions.php around line 119, remove or comment out like this.

$html = '<ul class="exhibit-page-nav navigation" id="secondary-nav">' . "\n";
    //$pagesTrail = $exhibitPage->getAncestors();
    $pagesTrail[] = $exhibitPage;
    $html .= '<li>';
    //$html .= '<a class="exhibit-title" href="'. html_escape(exhibit_builder_exhibit_uri($exhibit)) . '">';
    //$html .= html_escape($exhibit->title) .'</a></li>' . "\n";

When you upgrade the plugin, those changes will of course be overridden, so it might be worth creating a completely new function that just has these changes.

Perfect! Thank you so much Patrick, as always! Karen

It worked perfectly! Thank you so much as always! Karen