adds menu css
This commit is contained in:
parent
591bca7f2b
commit
d89708381d
|
@ -74,10 +74,20 @@ if (count($items[0]) == 0) {
|
||||||
|
|
||||||
if (!function_exists('render_menu')) {
|
if (!function_exists('render_menu')) {
|
||||||
function render_menu($items, $level_id) {
|
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) {
|
foreach ($items[$level_id] as $menu_item) {
|
||||||
echo '<li>' . PHP_EOL;
|
if ($level_id == 0) {
|
||||||
echo '<a href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>' . PHP_EOL;
|
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)) {
|
if (array_key_exists($menu_item['id'], $items)) {
|
||||||
render_menu($items, $menu_item['id']); // render sub menu
|
render_menu($items, $menu_item['id']); // render sub menu
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue