Browse Source

always show breadcrumbs

master
filesite 4 months ago
parent
commit
2fa9b701ea
  1. 20
      themes/beauty/views/site/index.php

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

@ -82,37 +82,37 @@ if (!empty($category['files'])) {
} }
if (!empty($breadcrumbs)) { $totalNum = '';
$totalNum = ''; if ($total > 0) {
if ($total > 0) {
$totalNum = <<<eof $totalNum = <<<eof
<span class="pull-right total">总数 <strong>{$total}</strong></span> <span class="pull-right total">总数 <strong>{$total}</strong></span>
eof; eof;
} }
echo <<<eof echo <<<eof
<div class="breadcrumbs text_dark"> <div class="breadcrumbs text_dark">
{$totalNum} {$totalNum}
<small>当前位置:</small> <small>当前位置:</small>
<a href="/">首页</a> / <a href="/">首页</a>
eof; eof;
if (!empty($breadcrumbs)) {
foreach ($breadcrumbs as $bread) { foreach ($breadcrumbs as $bread) {
if ($bread['id'] != $selectedId) { if ($bread['id'] != $selectedId) {
echo <<<eof echo <<<eof
<a href="{$bread['url']}">{$bread['name']}</a> / / <a href="{$bread['url']}">{$bread['name']}</a>
eof; eof;
} else { } else {
echo <<<eof echo <<<eof
<strong>{$bread['name']}</strong> / <strong>{$bread['name']}</strong>
eof; eof;
} }
} }
}
echo <<<eof echo <<<eof
</div> </div>
eof; eof;
}
?> ?>
<?php <?php

Loading…
Cancel
Save