我按照官方文档:
的说明,调用第五个分类的内容,但是输出的结果不对。
代码如下:
<?php $this->widget('Widget_Archive@myCustomCategory', 'type=category', 'mid=5')->to($categoryPosts); ?>
<?php while($categoryPosts->next()): ?>
<li><a href="<?php $categoryPosts->permalink(); ?>" title="<?php $categoryPosts->commentsNum('%d Comments'); ?>"><?php $categoryPosts->title(); ?></a></li>
<?php endwhile; ?>
请问问题出在哪里?
我用的1.0版。
已自解决。
改为