phpcms文章页要显示上一页下一页效果并不难,下面的代码大家不妨参考下,或许有所帮助
复制代码
代码如下:{get sql="select * from phpcms_content where contentid>$contentid and catid=$catid order by contentid" rows="1"}<div class="p_left">上一条:<a href="{$r[url]}">{str_cut($r[title], 50,'')}</a></div>{/get}
{get sql="select * from phpcms_content where contentid<$contentid and catid=$catid order by contentid desc" rows="1"}<div class="p_right">下一条:<a href="{$r[url]}">{str_cut($r[title],50,'')}</a></div>{/get}