Browse Source

notice error fix

master
filesite 3 years ago
parent
commit
84deb7fbcd
  1. 2
      themes/googleimage/views/site/index.php

2
themes/googleimage/views/site/index.php

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

Loading…
Cancel
Save