下面那样写就可以实现调用多栏目下的同一个推荐位了。
{php $where = "catid IN (25,26,20,21) "}
{pc:content action="position" posid="2" order="listorder DESC" where="$where" moreinfo="1" num="2"}
{loop $data $r}
<a href="{$r[url]}" title="{$r[title]}">{str_cut($r[title],36,'')}</a><br>
{str_cut($r[description],112)}
<div class="bk20 hr"><hr /></div>
{/loop}
{/pc}
但是这样写就不可以,应该是在pc标签里面 不解析 catid IN (25,26,20,21) 这语句,晕!
{pc:content action="position" posid="2" order="listorder DESC" where="catid IN (25,26,20,21) " moreinfo="1" num="2"}
{loop $data $r}
<a href="{$r[url]}" title="{$r[title]}">{str_cut($r[title],36,'')}</a><br>
{str_cut($r[description],112)}
<div class="bk20 hr"><hr /></div>
{/loop}
{/pc}