omeka / omeka/plugin-ExhibitBuilder

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

Open
#48 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
25
Forks
37
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current exhibit section and page navigation entry points, then compare their behavior with the Omeka 1.x exhibit_builder_nested_nav() example in this issue. Determine how the current version represents exhibits, sections, and pages before deciding where the equivalent function belongs. Done means nested section navigation supports current-section handling and the showAllPages option without breaking existing navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.