织梦上一页下一页列表翻页单独调用的实现代码

织梦上一页下一页列表翻页单独调用的实现代码,第1张

概述这个效果就是,列表页上的上一页和下一页,就是单独调用这两个功能,那么怎么实现呢? 简单搞了一下,仅作上下翻页,主页类似,可自行添加。 修改办法如下 找到这个文件 include\arc.listview.class.php 修改一下代码: //获得上一页和主页的链接 if($this-P 修改一下代码:
if($this->PageNo != 1)
{
$prepage.="上一页\r\n";
$indexpage="首页\r\n";


}
else
{
$indexpage="首页\r\n";

}

//下一页,未页的链接
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.="下一页\r\n";
$endpage="末页\r\n";


}
else
{
$endpage="末页\r\n";

}



然后添加以下红色代码:

$pList = '';

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;

最后在模板中调用以下代码:
{dede:Pagelist Listitem="down"/}
这样就可以单独的调用上一页下一页了的功能了。

总结

以上是内存溢出为你收集整理的织梦上一页下一页列表翻页单独调用的实现代码全部内容,希望文章能够帮你解决织梦上一页下一页列表翻页单独调用的实现代码所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/1013153.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)