调用指定栏目最近更新的标签如下:
{@res.join table1='%s_content_categroy_bind' table2='%s_content' field2='title,url,date' on='id' where='t2.status=1 and t1.cid in (1,2,6,7,8,10)' group='t2.id desc' number='4'} {#foreach($res as $rs)} <ul> <li> <span>{$rs[date] date='Y-m-d'}</span> <a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}" target="_blank">{$rs[title]}</a> </li> </ul> {#endforeach}
where=''单引号里面的是指定栏目id号。则为内容应用的分类id。
因需求需要分屏调用接着四条,运用 number='4,4' 则可以实现跳过四篇调用四篇。故完整的实现标签如下:
转载请注明出处:唯众网络