在列表頁單獨調(diào)用,以及首頁,簡單搞了一下,僅作上下翻頁,主頁類似,可自行添加。
前端調(diào)用
{dede:pagelist listitem="up"/}
{dede:pagelist listitem="down"/}
修改方法
打開include\arc.listview.class.php文件
找到:
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.="<</b>li><</b>a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一頁\r\n";
$endpage="<</b>li><</b>a href='".str_replace("{page}",$totalpage,$tnamerule)."'>末頁\r\n"; </p> <p>$downpage.="<</b>a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一頁\r\n";
}
else
{
$endpage="<</b>li>末頁\r\n";
$downpage.="<</b>a>沒有了\r\n";
}
在它下面加入
$plist = '';
if(preg_match('/up/i', $listitem)) $plist .= $uppage;
if(preg_match('/down/i', $listitem)) $plist .= $downpage;
if(preg_match('/index/i', $listitem)) $plist .= $indexpage;
if(preg_match('/pre/i', $listitem)) $plist .= $prepage;
if(preg_match('/pageno/i', $listitem)) $plist .= $listdd;
if(preg_match('/next/i', $listitem)) $plist .= $nextpage;
if(preg_match('/end/i', $listitem)) $plist .= $endpage;
if(preg_match('/option/i', $listitem)) $plist .= $optionlist;
if(preg_match('/info/i', $listitem)) $plist .= $maininfo;