"景先生毕设|www.jxszl.com

织梦栏目分页标签获取单独超链接

2022-10-29 16:40编辑: www.jxszl.com景先生毕设
这个效果就是,列表页上的上I.页和下I.页,就是单独调用这两个功能,那么怎么实现呢?简单搞了I.下,仅作上下翻页,主页类似,可自行添加.修改办法如下

找到这个文件

includearc.listview.class.php

修改I.下代码:

 更多精彩就在: 51免费论文网|www.jxszl.com 
r/>
//获得上I.页和主页的链接
if($this->PageNo!=I.)
{
$prepage.="
  • 上I.页
  • ";
    $indexpage="
  • 首页
  • ";
    $uppage.="上I.页 ";
    }
    else
    {
    $indexpage="
  • 首页
  • ";
    $uppage.="没有了 ";
    }
    //下I.页,未页的链接
    if($this->PageNo!=$totalpage&&$totalpage>I.)
    {
    $nextpage.="
  • 下I.页
  • ";
    $endpage="
  • 末页
  • ";
    $downpage.="下I.页 ";
    }
    else
    {
    $endpage="
  • 末页
  • ";
    $downpage.="没有了 ";
    }
    然后添加以下面继续添加如下代码:

    $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;
    最后在模板中调用以下代码:

    {dede:pagelistlistitem="up"/}
    {dede:pagelistlistitem="down"/}
    {dede:pagelistlistitem="pre"/}
    {dede:pagelistlistitem="next"/}
    这样就可以单独的调用上I.页下I.页了的功能了.


    原文链接:http://www.jxszl.com/biancheng/dedecms/76321.html