Skip to content

Commit

Permalink
Fix error html validate in Mega Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Dec 2, 2022
1 parent 594b224 commit c77b90e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions framework/library/astroid/Component/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,14 @@ public static function getMenu($menutype = '', $nav_class = [], $logo = null, $l
}
// The next item is shallower.
elseif ($item->shallower) {
echo '</li>';
if ($item->level == 1 && $item->parent) {
echo str_repeat('</ul></div>' . '</li>', $item->level_diff);
} else {
echo str_repeat('</ul>' . '</li>', $item->level_diff);
$l = $item->level;
for ($i = 0; $i < $item->level_diff; $i++) {
if ($l > 2) {
echo '</ul>' . '</li>';
} else {
echo '</ul></div>' . '</li>';
}
$l--;
}
}
// The next item is on the same level.
Expand Down

0 comments on commit c77b90e

Please sign in to comment.