一个typecho独立页面模板,
<?php
/**
* 文章分类
*
* @package custom
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<h2 class="page-title"><?php $this->title() ?></h2>
<hr>
<?php $this->widget('Widget_Metas_Category_List')->parse('<a href="{permalink}"> {name} · ({count})</a>'); ?>
<?php $this->need('footer.php'); ?>
其中header.php
已经调用了一次
$this->widget('Widget_Metas_Category_List')->parse('<a href="{permalink}">{name} · ({count})</a>'); ?>
结果这个独立页面模板就无法显示分类了,如果去掉header.php
,就能显示,为什么会这样?应该怎么达到多次调用显示的目的?
Widget_Metas_Category_List后面加@和自定义字母啥的应该就行了,同一个页面调用多次的话@后面的字母不同即可