欢迎来到元素模板ys720.com,本站提供专业的织梦模板PBOOTCMS模板网站模板网站修改/网站仿站
当前位置:主页 > 程序教程 > zblog教程 >
zblog教程

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

(元素模板) / 2022-05-18 11:31

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}

Copyright @ 2013-2021 元素模板 www.ys720.com All Rights Reserved. 版权所有 元素模板 www.ys720.com