我们在做zblog主题中常常需要调用指定tag的文章列表,这样可以让网站内容的类别多样,展示更加丰富。
用下面的调用代码就可以实现:
PHP
{$array=Getlist(9,null,null,null,array($zbp->GetTagByID(242),$zbp->GetTagByAliasOrName('phptheme')));} {foreach $array as $article} {template:thumbnail} <div class="theme-item"> <div class="theme-item-box"> <div class="theme-bg" style="background:url({$temp}) no-repeat center top; background-size:cover;"><a href="{$article.Url}" title="{$article.Title}" target="_blank"></a> </div> <div class="theme-title"> <h3><a href="{$article.Url}" class="overdot work-title" target="_blank" title="{$article.Title}">{$article.Title}</a></h3> <div class="theme-description">{$article.Intro}</div> <div class="theme-meta"> <div class="theme-meta-price"> <div class="download-meta-price-details"> <a href="{$article.Category.Url}" rel="bookmark"><span class="edd_price">{$article.Category