<i id='t9v5p49l'><tr id='vpidap7f'><dt id='wt6cdfwg'><q id='ge0bu2aj'><span id='f08po6fw'><b id='38sz0nn3'><form id='b21bou0w'><ins id='rje5ztjb'></ins><ul id='2k9u9ina'></ul><sub id='z27zenp6'></sub></form><legend id='br2lfuep'></legend><bdo id='eq5i34on'><pre id='osyb704v'><center id='gzaxi67j'></center></pre></bdo></b><th id='4wqi004t'></th></span></q></dt></tr></i><div id='fan8l0t6'><tfoot id='behqhd4v'></tfoot><dl id='b4m7y7vd'><fieldset id='dy6rl6mf'></fieldset></dl></div>

  1. <tfoot id='ol2gt70g'></tfoot>

      <bdo id='57o6j3pt'></bdo><ul id='ch7yw29b'></ul>
  2. <legend id='sjt9qvdn'><style id='6ucfa81c'><dir id='245z6i4p'><q id='0tm04683'></q></dir></style></legend>

    <small id='5wdn6yf8'></small><noframes id='rx2bk3y2'>

    1. 精准传达 • 价值共享

      洞悉互联网前沿资讯,探寻网站营销规律

      织梦获取上一页下一页标题 链接单独调用

      作者: 庚午网络 | 2020-11-06 16:51 |点击:

      SEO 网络推广 DEDECMS5.7

      • <i id='4drppj24'><tr id='fs62uztu'><dt id='gmlaz106'><q id='eav8vuki'><span id='fif6oeaf'><b id='6mfbvovm'><form id='ii3bhrul'><ins id='m4ptv86m'></ins><ul id='6z0apalx'></ul><sub id='2o36wxga'></sub></form><legend id='6vcies88'></legend><bdo id='khh1jjao'><pre id='t8zkcoap'><center id='anwvjgrc'></center></pre></bdo></b><th id='q84bhirr'></th></span></q></dt></tr></i><div id='pbhnkhqo'><tfoot id='cir04gh5'></tfoot><dl id='bymcqee3'><fieldset id='zpajn1o1'></fieldset></dl></div>

          <bdo id='6oikwfct'></bdo><ul id='q8nivso8'></ul>
            <tbody id='xocxav65'></tbody>
        • <legend id='1nt5ru34'><style id='l6xrjcsn'><dir id='fc8bi8nj'><q id='ywuhiki1'></q></dir></style></legend>

          <small id='8fwwtpjv'></small><noframes id='yh7br1do'>

            1. <tfoot id='eg6oyoge'></tfoot>
              1. 织梦默认的上一篇,下一篇调用标签是:{dede:prenext get='pre'/} {dede:prenext get='next'/},有的情况加 我们只想要单独的链接和标题那该怎么办呢!接下来交大家方法.
                第一步:打开/include/arc.archives.class.php文件
                找到:
                    /**
                     *  获取上一篇,下一篇链接
                     *
                     * @access    public
                     * @param     string  $gtype  获取类型  
                     *                    pre:上一篇  preimg:上一篇图片  next:下一篇  nextimg:下一篇图片
                     * @return    string
                     */
                 大概在795行左右
                织梦获取上一页下一页标题 链接单独调用
                替换代码:
                    /**
                     *  获取上一篇,下一篇链接
                     *
                     * @access    public
                     * @param     string  $gtype  获取类型  
                     *                    pre:上一篇  preimg:上一篇图片  next:下一篇  nextimg:下一篇图片
                     * @return    string
                     */
                    function GetPreNext($gtype='')
                    {
                        $rs = '';
                        if(count($this->PreNext)<2)
                        {
                            $aid = $this->ArcID;
                            $preR =  $this->dsql->GetOne("Select id From `dede_arctiny` where id<$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id desc");
                            $nextR = $this->dsql->GetOne("Select id From `dede_arctiny` where id>$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id asc");
                            $next = (is_array($nextR) ? " where arc.id={$nextR['id']} " : ' where 1>2 ');
                            $pre = (is_array($preR) ? " where arc.id={$preR['id']} " : ' where 1>2 ');
                            $query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,
                                        t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
                                        from `dede_archives` arc left join dede_arctype t on arc.typeid=t.id  ";
                            $nextRow = $this->dsql->GetOne($query.$next);
                            $preRow = $this->dsql->GetOne($query.$pre);
                            if(is_array($preRow))
                            {
                                $mlink = GetFileUrl($preRow['id'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],$preRow['ismake'],$preRow['arcrank'],
                                $preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);
                                $this->PreNext['next'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
                $this->PreNext['nexturl'] = "$mlink"; //上一篇链接地址
                $this->PreNext['nextname'] = "{$preRow['title']}"; //上一篇文章标题
                $this->PreNext['prewap'] = "<a href=\"view.php?aid={$preRow['id']}\" class=\"pg_a-son fl\" data-ignore=\"true\">上一条</a>  ";
                                $this->PreNext['nextimg'] = "<a href='$mlink'><img src=\"{$preRow['litpic']}\" alt=\"{$preRow['title']}\"/></a> "; 
                            }
                            else
                            {
                                $this->PreNext['next'] = "上一篇:没有了 ";
                $this->PreNext['nexturl'] = ""; //上一篇链接地址
                $this->PreNext['prewap'] = "<a href=\"javascript:;\" class=\"pg_a-son fl\" data-ignore=\"true\">没有了</a>  ";
                                $this->PreNext['nextimg'] ="<img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有上一图集了!\"/>";
                            }
                            if(is_array($nextRow))
                            {
                                $mlink = GetFileUrl($nextRow['id'],$nextRow['typeid'],$nextRow['senddate'],$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'],
                                $nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],$nextRow['filename'],$nextRow['moresite'],$nextRow['siteurl'],$nextRow['sitepath']);
                                $this->PreNext['pre'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
                $this->PreNext['preurl'] = "$mlink"; //上一篇链接地址
                $this->PreNext['prename'] = "{$nextRow['title']}"; //上一篇文章标题
                $this->PreNext['nextwap'] = "<a href=\"view.php?aid={$nextRow['id']}\" class=\"pg_a-son fr\" data-ignore=\"true\">下一条</a> ";
                                $this->PreNext['preimg'] = "<a href='$mlink'><img src=\"{$nextRow['litpic']}\" alt=\"{$nextRow['title']}\"/></a> ";
                            }
                            else
                            {
                                $this->PreNext['pre'] = "下一篇:没有了 ";
                $this->PreNext['preurl'] = ""; //上一篇链接地址
                $this->PreNext['nextwap'] = "<a href=\"javascript:;\" class=\"pg_a-son fr\" data-ignore=\"true\">没有了</a> ";
                                $this->PreNext['preimg'] ="<a href='javascript:void(0)' alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有下一图集了!\"/></a>";
                            }
                        }
                        if($gtype=='pre')
                        {
                            $rs =  $this->PreNext['pre'];
                        }
                else if($gtype=='prewap'){
                            
                            $rs =  $this->PreNext['prewap'];
                        }
                        else if($gtype=='preimg'){
                            
                            $rs =  $this->PreNext['preimg'];
                        }
                        else if($gtype=='next')
                        {
                            $rs =  $this->PreNext['next'];
                        }
                else if($gtype=='nextwap')
                        {
                            $rs =  $this->PreNext['nextwap'];
                        }
                        else if($gtype=='nextimg'){
                            
                            $rs =  $this->PreNext['nextimg'];
                        }
                else if($gtype=='preurl'){
                 
                             $rs =  $this->PreNext['preurl'];
                        }
                        else if($gtype=='prename'){
                 
                        $rs =  $this->PreNext['prename'];
                        }
                        else if($gtype=='nexturl'){
                            
                            $rs =  $this->PreNext['nexturl'];
                        }
                        else if($gtype=='nextname'){
                            
                            $rs =  $this->PreNext['nextname'];
                        }
                        else
                        {
                            $rs =  $this->PreNext['pre']." &nbsp; ".$this->PreNext['next'];
                        }
                        return $rs;
                    }

                第二步:文件替换好了 ,那就可以调用的了,调用标签如下:
                 上一篇标题:{dede:prenext get='prename'/}     上一篇链接:{dede:prenext get='preurl'/}  

                下一篇标题:{dede:prenext get='nextname'/}  下一篇链接:{dede:prenext get='nexturl'/}  


                注:因为调用顺序是按发布时间更新的,有人问为啥下一篇链接用preurl,这个不做解释了,自己调用一下就明白了!
                二度创作,如有侵权请联系删除。如没特殊注明,文章均为庚午网络原创,转载请注明https://www.hngengwu.com/shejiguandian/420.html
                    <tfoot id='050ridf4'></tfoot>

                  1. <small id='iiuup770'></small><noframes id='e6bdcwrw'>

                      <bdo id='jmad5mmi'></bdo><ul id='mnbvurbx'></ul>
                    <i id='6k5f71e0'><tr id='3316ka3y'><dt id='vv4tj1fi'><q id='wufzxq29'><span id='gsazgqld'><b id='u1vd6z7r'><form id='450sb710'><ins id='edtpbe95'></ins><ul id='gr729gqz'></ul><sub id='6l1kljcs'></sub></form><legend id='fa17hu2z'></legend><bdo id='1ird0rim'><pre id='nrl9tazf'><center id='pa3kffob'></center></pre></bdo></b><th id='k3h8gjgw'></th></span></q></dt></tr></i><div id='3vdy8y91'><tfoot id='uvhk9r50'></tfoot><dl id='aol1upqs'><fieldset id='4i8i8iqp'></fieldset></dl></div>
                    <legend id='jqce64x5'><style id='r375xqmz'><dir id='i6mxjq2e'><q id='0ip14svf'></q></dir></style></legend>
                    多一份策划方案,总有益处。

                    请直接添加技术总监微信联系咨询

                    网站设计 品牌营销

                    多一份参考,总有益处

                    联系庚午网络,获得专属《策划方案》及报价

                    咨询相关问题或预约面谈,可以通过以下方式与我们联系

                    业务热线:18574395938 / 大客户专线:18574395938