Browse Source

add year sort for menus

master
filesite 2 days ago
parent
commit
35d19fcb7f
  1. 4
      themes/beauty/views/site/index.php

4
themes/beauty/views/site/index.php

@ -61,7 +61,9 @@ $main_view_cls = $menu_ext_status == 'opened' ? '' : 'full'; @@ -61,7 +61,9 @@ $main_view_cls = $menu_ext_status == 'opened' ? '' : 'full';
<li class="menu-title">按年月归类</li>
<?php
if (!empty($viewData['cacheDataByDate'])) {
foreach($viewData['cacheDataByDate'] as $year => $ids) {
$arrYears = array_keys($viewData['cacheDataByDate']);
arsort($arrYears);
foreach($arrYears as $year) {
$intYear = str_replace('y', '', $year);
echo <<<eof
<li><a href="###"><img src="/img/beauty/calendar.svg" alt="calendar" width="17" class="menu-icon"> {$intYear}年</a></li>

Loading…
Cancel
Save