Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add exhibit_builder_nested_nav() function like the one in Omeka 1.x versions #48

Open
JonathanReeve opened this issue Aug 9, 2013 · 1 comment

Comments

@JonathanReeve
Copy link

The code from the previous versions was this:

function exhibit_builder_nested_nav($exhibit = null, $showAllPages = false)
{
    if (!$exhibit) {
        if (!($exhibit = exhibit_builder_get_current_exhibit())) {
            return;
        }    
    }
    $html = '<ul class="exhibit-section-nav">';
    foreach ($exhibit->Sections as $exhibitSection) {
        $html .= '<li class="exhibit-nested-section' . (exhibit_builder_is_current_section($exhibitSection) ? ' current' : '') . '"><a class="exhibit-section-title" href="' . html_escape(exhibit_builder_exhibit_uri($exhibit, $exhibitSection)) . '">' . html_escape($exhibitSection->title) . '</a>';
        if ($showAllPages || exhibit_builder_is_current_section($exhibitSection)) {
            $html .= exhibit_builder_page_nav($exhibitSection);
        }
        $html .= '</li>';
    }
    $html .= '</ul>';
    $html = apply_filters('exhibit_builder_nested_nav', $html, $exhibit, $showAllPages);
    return $html;
}

It'd be great if there were something similar in the current version. If there are no plans to do this, I might write this function myself, although it'll take me quite a while to figure everything out.

@zerocrates
Copy link
Member

The new exhibit_builder_page_summary will make a nested list of links to children and sub-children when given an exhibit page.

What functionality are you looking for in the 2.x versions that you can't do now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants