V9版本默认好像没有多栏目调用的标签,例如我用{pc:content action="lists" catid ="6,7,8,9,10" num="10" order="id DESC"}是出不来的。于是发扬自己动手丰衣足食的作风,自己研究了一下弄出来了,现在发出来给跟我一样需要的朋友,代码如下:
{pc:get sql="SELECT `n`.`inputtime`,`n`.`url`,`n`.`title`,`c`.`catname`,`c`.`url` as `c_url` FROM `v9_news` as `n` left join `v9_category` as `c` on `n`.`catid` = `c`.`catid` where `c`.`catid` in (6,7,8,9,10) order by `n`.`id` desc" num="10" cache="3600" page="" dbsource="" return="data"}
{loop $data $key $val}
<li><span class="right">{date('Y-m-d H:i:s',$val[inputtime])}</span>[<a href="{$val[c_url]}" target="_blank">{$val[catname]}</a>] <a href="{$val[url]}" title="{$val[title]}" target="_blank">{$val[title]}</a></li>
{/loop}
{/pc}
相关热词搜索:phpcms
上一篇:V9版本盛大连接怎么关闭?