dedecms列表页上一页下一页翻页单独调用的方法
在列表页单独调用上I.页和下I.页,以及首页,简单搞了I.下,仅作上下翻页,主页类似,可自行添加.
在模板中以
复制代码代码如下:
{dede:pageli
更多精彩就在: 51免费论文网|www.jxszl.com
stlistitem="up"/}
{dede:pagelistlistitem="down"/}
来调用.
修改办法如下:
在includearc.listview.class.php
找到:
复制代码代码如下:
/获得上I.页和主页的链接
if($this->PageNo!=I.)
{
$prepage.="<li>上I.页 ";
$indexpage="<li>首页 ";
$uppage.="<a>上I.页 ";
}
else
{
$indexpage="<li>首页 ";
$uppage.="<a>没有了</a> ";
}
//下I.页,未页的链接
if($this->PageNo!=$totalpage&&$totalpage>I.)
{
$nextpage.="<li><a>下I.页
";
$endpage="<li><a>末页
";
$downpage.="<a>下I.页
";
}
else
{
$endpage="<li>末页
";
$downpage.="<a>没有了
";
}
然后:
复制代码代码如下:
$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;
希望本文所述对大家的dedecms建站有所帮助.
原文链接:http://www.jxszl.com/biancheng/dedecms/72446.html