代码: 全选
<?php $this->widget('Widget_Metas_Category_List')->to($category); ?>
<?php while($category->next()): ?>
<li<?php if($this->is('category', $category->slug)): ?> class="current"<?php endif; ?>><a href="<?php $category->permalink(); ?>" title="<?php $category->title(); ?>"><?php $category->name(); ?></a></li>
<?php endwhile; ?>
我试了下,可以正常使用,但是不确定是否正确!哪位高手能给个标准的写法,貌似我这样用了以后,在侧栏的默认调用分类会出错。