用PHPCMS V9网页时,经常会需要最新文章、全部文章等栏目块的数据,但是PHPCMS V9并未提供这样的标签。
我们可以对content模块下的lists便签进行where子句的扩展,实现多个栏目数据调用显示。
{pc:content action="lists" catid="6" order="id DESC" where="`catid` in (6,7,8,9,10)" num="4"} {loop $data $v} 列表内容 {/loop} {/pc}
{pc:content action="lists" catid="6" order="id DESC" where="`catid` in (6,7,8,9,10)" num="4"} {loop $data $v} 列表内容 {/loop} {/pc}