判断是否为首页并自定义输出内容

26次阅读

判断是否为首页,输出相关内容:

<?php if($this->is('index')): ?>
// 首页输出内容
<?php else: ?>
// 不是首页输出内容
<?php endif; ?>

判断当前分类,输出内容:

正文完