?>
</p>
</div>
<?php 
}
?>
</div>

<?php 
set_exhibit_pages_for_loop_by_exhibit();
if (has_loop_records('exhibit_page')) {
    ?>
<nav id="exhibit-pages">
    <ul>
        <?php 
    foreach (loop('exhibit_page') as $exhibitPage) {
        ?>
        <?php 
        echo exhibit_builder_page_summary($exhibitPage);
        ?>
        <?php 
    }
    ?>
    </ul>
</nav>
<?php 
}
?>

<?php 
echo foot();
Example #2
0
/**
 * Get a list item for a page, containing a sublist of all its children.
 */
function exhibit_builder_page_summary($exhibitPage = null)
{
    if (!$exhibitPage) {
        $exhibitPage = get_current_record('exhibit_page');
    }
    $html = '<li>' . '<a href="' . exhibit_builder_exhibit_uri(get_current_record('exhibit'), $exhibitPage) . '">' . metadata($exhibitPage, 'title') . '</a>';
    $children = $exhibitPage->getChildPages();
    if ($children) {
        $html .= '<ul>';
        foreach ($children as $child) {
            $html .= exhibit_builder_page_summary($child);
            release_object($child);
        }
        $html .= '</ul>';
    }
    $html .= '</li>';
    return $html;
}