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

找到这个文件

修改一下代码:
if($this->PageNo != 1)
{
$prepage.="
  • 上一页
  • \r\n";
    $indexpage="
  • 首页
  • \r\n";

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

    }

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

    下一页\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"/}
    这样就可以单独的调用上一页下一页了的功能了。

    相关文章

    文章浏览阅读483次。dedecms织梦频道模板中调用栏目分类并排...
    文章浏览阅读284次。我们在用织梦建站的过程中,难免会遇到各...
    文章浏览阅读152次。seo专题是seo优化必不可少的一环,对于网...
    文章浏览阅读142次。在Dedecms中,在列表页调用文章摘要的方...
    文章浏览阅读234次。织梦DedeCMS文章内容发布时可以选择“头...
    文章浏览阅读701次。虽然织梦DedeCMS因为安全问题被人所诟病...