adds menu css

This commit is contained in:
buttle 2022-03-25 13:09:53 +01:00
parent 591bca7f2b
commit d89708381d
1 changed files with 13 additions and 3 deletions

View File

@ -74,10 +74,20 @@ if (count($items[0]) == 0) {
if (!function_exists('render_menu')) {
function render_menu($items, $level_id) {
echo '<ul>' . PHP_EOL;
if ($level_id == 0) {
echo '<ul id="" class="dropdown menu" data-dropdown-menu="dropdown-menu" role="menubar">'.
PHP_EOL;
} else {
echo '<ul class="dropdown menu vertical submenu is-dropdown-submenu first-sub" data-toggle="" data-submenu="" role="">'.
PHP_EOL;
}
foreach ($items[$level_id] as $menu_item) {
echo '<li>' . PHP_EOL;
echo '<a href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>' . PHP_EOL;
if ($level_id == 0) {
echo '<li id="" class="" role="">'.PHP_EOL;
} else {
echo '<li id="" class="is-submenu-item is-dropdown-submenu-item" role="">'.PHP_EOL;
}
echo '<a role="" href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>'.PHP_EOL;
if (array_key_exists($menu_item['id'], $items)) {
render_menu($items, $menu_item['id']); // render sub menu
}