这个调用分类列表的循环,可以得到mid

    <?php $this->widget('Widget_Metas_Category_List')->to($recent);
    while($recent->next()):
        $recent->name();
    endwhile; ?>

上面那个循环拿到mid,就里面套这个循环

    <?php $this->widget('Widget_Archive@index1', 'pageSize=5&type=category', 'mid=分类ID')->to($categoryPosts);while($categoryPosts->next()):?>

<?php $this->widget('Widget_Archive@myCustomCategory', 'type=category', 'mid=1')->to($categoryPosts); ?>

循环内代码

    <?php $this->related(6)->to($relatedPosts); ?>
    循环内代码
    <?php endwhile; ?>
<?php $this->widget('Widget_Archive@index1', 'pageSize=2&type=category', 'mid=496')->to($categoryPosts); ?>
<?php while($categoryPosts->next()):?>
    <a href="<?php $categoryPosts->permalink(); ?>"><img src="<?php echo $categoryPosts->firstImageUrl;?>?imageView2/1/w/660/h/260" height="250" title="<?php $categoryPosts->title() ?>"></a>
<?php endwhile;?>
<?php
$this->widget('Widget_Archive@index', 'pageSize=6&type=category', 'mid=3')->parse('<li><a href="{permalink}">{title}</a></li>');
?>

扫描二维码,在手机上阅读!