diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-07-11 08:49:42 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-07-11 08:49:42 +0800 |
| commit | 6f15695f9d9dbbb4d83f3eaacdcfa8cf5b176d97 (patch) | |
| tree | fe115de7eb68e457c9753ed596530720cb9e2e7e | |
| parent | b0d993e2a2244cc392c89bd9d4971151dab6e9b4 (diff) | |
:zap: Perf: 在没有文章标签时,直接隐藏「文章标签」栏目
| -rw-r--r-- | pagefile.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pagefile.php b/pagefile.php index 4d03cac..4c03844 100644 --- a/pagefile.php +++ b/pagefile.php @@ -11,17 +11,15 @@ $this->need('includes/header.php'); <main class="main-container container" role="main">
<div class="post-body">
<div class="post-content page-content">
- <h2>文章标签</h2>
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0&limit=30')->to($tags); ?>
+ <h2>文章标签</h2>
<?php if($tags->have()): ?>
<ul class="tags-list">
<?php while ($tags->next()): ?>
<li class="tags-item"><a href="<?php $tags->permalink(); ?>" rel="tag" class="no-line" title="有 <?php $tags->count(); ?> 篇文章在这个标签下"><?php $tags->name(); ?></a></li>
<?php endwhile; ?>
</ul>
- <?php else: ?>
- <p><?php _e('看来这个博主没有写标签的习惯~'); ?></p>
- <?php endif; ?>
+ <?php endif; ?>
<br />
<h2>文章归档</h2>
<ul class="archives-list">
|
