Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.

Multi level submenu navigation help #5

Description

@fsvxavier

Hello, I have implemented in your code enabling multi level submenu.

Below is the copy of the code:

IN public function htmlify(

if ($page->hasChildren() and !$submenu) {
$html .= ' ';
}

IN protected function renderNormalMenu

        if($depth > 0 and $page->hasChildren()){
            $submenu = true;
        } else {
            $submenu = false;
        }

        // make sure indentation is correct
        $depth -= $minDepth;
        $myIndent = $indent . str_repeat('        ', $depth);


        // render li tag and page
        $liClass = $page->hasChildren() ? $submenu ? ' dropdown-submenu' :' dropdown'  : '';


        $html .= $myIndent . '    <li' . $liClass . '>' . self::EOL
                . $myIndent . '        ' . $this->htmlify($page, $escapeLabels, $submenu) . self::EOL;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions