phpcms v9 文章页如何增加上一页和下一页

在phpcms v9文章页增加上一篇和下一篇按钮

上一篇:  

{pc:get sql="SELECT * FROM v9_news WHERE id < $id ORDER BY id DESC" num="1" return="p"}{loop $p $pv}  

{php $pid = "id = $pv[id]"}  

{pc:content action="lists" catid="$catid" where="$pid" order="id DESC" num="1"}  

<ul>  

{loop $data $key $val}  

<li> <a href="{$val['url']}">{$val['title']}</a></li>  

{/loop}  

</ul>  

{/pc}  

{/loop}{/pc}  

下一篇:  

{pc:get sql="SELECT * FROM v9_news WHERE id > $id ORDER BY id ASC" num="1" return="ne"}{loop $ne $nev}  

{php $neid = "id = $nev[id]"}  

{pc:content action="lists" catid="$catid" where="$neid" order="id DESC" num="1"}  

<ul>  

{loop $data $key $val}  

<li> <a href="{$val['url']}">{$val['title']}</a></li>  

{/loop}  

</ul>  

{/pc}  

{/loop}{/pc}