phpcms文章頁要顯示上一頁下一頁效果并不難,下面的代碼大家不妨參考下,或許有所幫助
本文主要分享了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}
更多信息請查看IT技術(shù)專欄