Multi level submenu navigation help
Opened this issue · 0 comments
fsvxavier commented
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;