diff --git a/app/widget/Menu.php b/app/widget/Menu.php index 7cf9897..6117e2a 100644 --- a/app/widget/Menu.php +++ b/app/widget/Menu.php @@ -19,6 +19,7 @@ class Menu $data = [ 'categoryId' => $categoryId, 'menus' => $menus, + 'currentFirstId' => $currentFirstId, ]; return View::assign($data)->fetch('public/menu'); } diff --git a/view/public/menu.html b/view/public/menu.html index a0a8bda..c339b57 100644 --- a/view/public/menu.html +++ b/view/public/menu.html @@ -1,17 +1,43 @@ +{php} +function getMenus($menus, $level = 1, $currentFirstId, $categoryId) { + $menuHtml = ''; + if (count($menus) > 0) { + $menuHtml .= '
'; + } + return $menuHtml; +} +{/php} +