这个调用分类列表的循环,可以得到mid
<?php $this->widget('Widget_Metas_Category_List')->to($recent);
while($recent->next()):
$recent->name();
endwhile; ?>
上面那个循环拿到mid,就里面套这个循环
widget('Widget_Archive@index1', 'pageSize=5&type=category', 'mid=分类ID')->to($categoryPosts);while($categoryPosts->next()):?>
循环内代码
<?php $this->related(6)->to($relatedPosts); ?>
循环内代码
<?php endwhile; ?>