|
|
@ -1,7 +1,7 @@ |
|
|
|
<div class="menu"> |
|
|
|
<div class="menu"> |
|
|
|
<?php |
|
|
|
<?php |
|
|
|
$selectedId = $viewData['cateId']; |
|
|
|
$selectedId = $viewData['cateId']; |
|
|
|
$breadcrumbs = $viewData['breadcrumbs']; |
|
|
|
$breadcrumbs = !empty($viewData['breadcrumbs']) ? $viewData['breadcrumbs'] : []; |
|
|
|
if (!empty($viewData['menus'])) { //只显示第一级目录 |
|
|
|
if (!empty($viewData['menus'])) { //只显示第一级目录 |
|
|
|
foreach($viewData['menus'] as $index => $item) { |
|
|
|
foreach($viewData['menus'] as $index => $item) { |
|
|
|
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'selected' : ''; |
|
|
|
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'selected' : ''; |
|
|
|