联系电话:020-28187900

多分类联合调用标签

发表时间:2012-08-20 阅读: 2103

K9的多分类联合调用一般应用文章的推荐、置顶等比较显目的地方,原理是:只有同时勾选2个或者2个以上的分类,才被标签调用出来,是与关系。

例子标签:

一般得3表或3表以上的关联调用,以下标签必须同时勾选上分类1和分类5的文章才被标签调用

{@res.join table1='%s_content_categroy_bind' table2='%s_content'field2='title,url,date'table3='%s_content_categroy_bind' on='id' where='t2.mid=1 and t2.status=1 and t1.cid=1 and t3.cid=5' order='t2.id desc' number='6'}
{#foreach($res as $rs)}
<li><a href="{DIR}{$rs[url]}" title="{$rs[title]}">{$rs[title] size="32"}</a><span>{$rs[date] date='Y-m-d'}</span></li>
{#endforeach}

转载请注明出处:唯众网络


相关教程 【更多】

唯众网络