zblog批量调取多个分类及其分类下的文章列表

{$b = array('11','27','28','31','26','30','7');}{*按顺序填入分类ID*}
{foreach $b as $key => $cid}
<div class="sort-list xiangguan">
<div class="proitemtop clearfix">
<small class="kico-ni">相关文章</small>
{$array=Getlist(4,$cid,null,null,null,null,array('has_subcate'=>true));}
<h3><a href="{$zbp->GetCategoryByID($cid)->Url}">{$zbp->GetCategoryByID($cid)->Name}</a></h3>
<small class="counts"><i class="kico-book"></i> 分类下共{$zbp->GetCategoryByID($cid)->Count}篇文章</small>
<p>{$zbp->GetCategoryByID($cid)->Intro}</p>
<div class="prolianjie">
<a href="{$zbp->GetCategoryByID($cid)->Url}" class="more_detail" rel="nofollow">查看更多</a>
</div>
</div>
<ul class="clearfix">
{foreach $array as $article}
<li><a href="{$article.Url}" class="cp-pic"><img src="{suijiimg_suiji($article)}" alt="{$article.Title}"></a>
<div class="cp-tit"><a class="title" title="{$article.Title}" href="{$article.Url}">{$article.Title}</a>
<div class="postmeta">
<time>{$article.Time('Y-m-d H:i:s')}</time>
<span><i class="kico-eye"></i> {$article.ViewNums} ℃</span></div>
</div>
</li>
{/foreach}
</ul>
</div>
{/foreach}

 

posted @ 2021-02-25 21:11  绿林豪士  阅读(479)  评论(0编辑  收藏  举报