您当前的位置: 主页 > 优化教程
在英文站中列表分页导航出现“首页 上一页 下一页 末页”,当前位置:首页>about>,这样的问题改如何解决呢?本文就来解决一下这两个问题。
 
1:列表分页英文设置教程
用arc.listview.class.php覆盖include/arc.listview.class.php
 
调用方法:
{dede:pagelist listsize='5'/}
{dede:pagelist pagelang='en' listsize='5'/} 
pagelang:en为英文,cn为中文,默认语言中文
 
扩展阅读:
/**
     *  获取静态的分页列表
     *
     * @access    public
     * @param     string  $list_len  列表宽度
     * @param     string  $list_len  列表样式
     * @return    string
     */
    function GetPageListST($list_len,$listitem="index,end,pre,next,pageno",$pagelang)
    {
                    /*****************************************************************************************/
                      if($pagelang='cn'){
                                $uahome="首页";
                               $uaprevious="上一页";
                               $uanext="下一页";
                               $ualastpage="末页";
                               $uapage="页";
                               $uatotal="共";
                               $uarecords="条记录";
                            }else{
                              $uahome=" Home ";
                               $uaprevious=" Previous ";
                               $uanext=" Next ";
                               $ualastpage=" Last Page ";
                               $uapage=" Page ";
                               $uatotal=" Total ";
                               $uarecords=" Records. ";
                          }
                    
        $prepage = $nextpage = '';
        $prepagenum = $this->PageNo-1;
        $nextpagenum = $this->PageNo+1;
        if($list_len=='' || ereg("[^0-9]",$list_len))
        {
            $list_len=3;
        }
        $totalpage = ceil($this->TotalResult/$this->PageSize);
        if($totalpage<=1 && $this->TotalResult>0)
        {
           return "<li><span class=\"pageinfo\">".$uatotal." <strong>1</strong> ".$uapage." <strong>".$this->TotalResult."</strong> 
 
".$uarecords."</span></li>\r\n";
        }
        if($this->TotalResult == 0)
        {
        return "<li><span class=\"pageinfo\">".$uatotal." <strong>0</strong> ".$uapage." <strong>".$this->TotalResult."</strong> 
 
".$uarecords."</span></li>\r\n";
  
        }
        $purl = $this->GetCurUrl();
              $maininfo = "<li><span class=\"pageinfo\">".$uatotal." <strong>{$totalpage}</strong> ".$uapage." <strong>".$this->TotalResult."</strong> 
 
".$uarecords."</span></li>\r\n";
           
        $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields
 
['namerule2']);
        $tnamerule = ereg_replace('^(.*)/','',$tnamerule);
 
        //获得上一页和主页的链接
        if($this->PageNo != 1)
        {
            $prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>".$uaprevious."</a></li>\r\n";
            $indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>".$uahome."</a></li>\r\n";
        }
        else
        {
            $indexpage="<li>".$uahome."</li>\r\n";
        }
 
        //下一页,未页的链接
        if($this->PageNo!=$totalpage && $totalpage>1)
        {
            $nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>".$uanext."</a></li>\r\n";
            $endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>".$ualastpage."</a></li>\r\n";
        }
        else
        {
            $endpage="<li>".$ualastpage."</li>\r\n";
        }
 
        //option链接
        $optionlist = '';
 
        $optionlen = strlen($totalpage);
        $optionlen = $optionlen*12 + 18;
        if($optionlen < 36) $optionlen = 36;
        if($optionlen > 100) $optionlen = 100;
        $optionlist = "<li><select name='sldd' style='width:{$optionlen}px' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n";
        for($mjj=1;$mjj<=$totalpage;$mjj++)
        {
            if($mjj==$this->PageNo)
            {
                $optionlist .= "<option value='".str_replace("{page}",$mjj,$tnamerule)."' selected>$mjj</option>\r\n";
            }
            else
            {
                $optionlist .= "<option value='".str_replace("{page}",$mjj,$tnamerule)."'>$mjj</option>\r\n";
            }
        }
        $optionlist .= "</select></li>\r\n";
 
        //获得数字链接
        $listdd="";
        $total_list = $list_len * 2 + 1;
        if($this->PageNo >= $total_list)
        {
            $j = $this->PageNo-$list_len;
            $total_list = $this->PageNo+$list_len;
            if($total_list>$totalpage)
            {
                $total_list=$totalpage;


关键词:网站建设,网站设计,网站制作,网站优化    标签:
    更多资讯请收藏关注 网站模板(www.1yc.cn)

Dedecms如何修改程序文件达到让会员无法发布重复文章的方法小编经常遇到客户的论坛被刷会员或者被会员们大量的刷垃圾帖子,经常建站的... 2021-07-30
dedecms标签:channel 频道调用标签标签名称:channel 标记简介:织梦常用标记,通常用于网站顶部以获... 2021-07-22
dedecmsdedecms相关专题的调用方法dedecms织梦相关专题的调用方法 。 在需要调用相关专题的地方添加... 2021-08-09
用织梦做中英文网站分页导航和面包屑导航制作方法在英文站中列表分页导航出现首页 上一页 下一页 末页,当前位置:首页a... 2021-09-19
织梦dedecms 安装模块(插件)后台空白扥登录不上的解决方法在 织梦模板 网站上安装网站地图模块插件,装完了就再也进不去后台管理界... 2021-07-22
织梦留言板guestbook.htm加入头部导航织梦建站的时候如果有留言板,通常都是不像织梦这样的留言板独立的页面;都... 2021-07-30
DEDECMS实现文章tag关键词自动生成列表页的方法本文实例讲述了DEDECMS实现文章tag关键词自动生成列表页的方法。... 2021-07-27
DedeCMS百度结构化数据插件常见404跳转、重复域名网址、路径等问最近刚使用织梦DedeCMS百度结构化数据插件,但是在使用中却遇到了4... 2021-07-30
织梦禁止调用隐藏栏目下文章的方法在用 织梦模板 建站的过程中,涉及调用全站的最新文章时,DedeCMS... 2021-07-22
DedeCMS文章标题长度最全修改方法有时候DedeCMS首页或者其他页面不能全部展示文章标题,造成读者阅读... 2021-08-14
教程:dede输出织梦全站RSS文件的方法织梦后台默认生成更新RSS文件是按照网站栏目生成告诉用户每个栏目的RS... 2021-09-16
织梦灵活使用参数 调用不同的友情链接在研究DEDECMS 织梦模板 时我们发现在链接 link 里面的参数... 2021-07-27
dedecms列表页隔行指定分隔符或红线的办法我们在使用织梦cms二次开发的时候 有很多时候需要对列表和各种样式,比... 2021-07-22
dedecms织梦 if 判断语句用法{dede:field.tong_gg php=yes} if(@me... 2021-07-27

线
咨询热线:
135-0038-3336
在线客服:
点击这里给我发消息
微信交流:
公司官网: www.1yc.cn