您当前的位置: 主页 > 优化教程
在英文站中列表分页导航出现“首页 上一页 下一页 末页”,当前位置:首页>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)

dede织梦上传的图片相对路径改成绝对路径找到 \include\dialog\select_images_po... 2021-07-22
dedecms教程:登录管理后台总是验证码错误的解决在网上找了很多的解决方案,说法有很多种,但最后都无法解决这个问题, 1... 2021-07-22
如何修改DEDE后台的标题-织梦内容管理系统dede/template/index2.htm 这个后台页面中。修改... 2021-07-30
dedecms织梦系统$GLOBALS定义文件在哪DedeCMS数据库的信息是写在data/common.inc.php... 2021-07-27
dede通过后台SQL命令批量修改文章内容和缩略图路径织梦dedecms通过后台SQL命令批量修改文章内容和缩略图 。 1.... 2021-07-30
EDE自带的采集功能,标题太短的解决方法DEDE自带的采集功能,标题太短获取不全的解决方法 搜索了好多之后,终... 2021-07-30
DedeCms织梦模板 autoindex和itemindex 使用教程让dedecms autoindex,itemindex 从0到1开始... 2021-07-22
dedecms使用SQL代码调用指定栏目tag标签在使用 dedecms 织梦模板 建站中,很有可能需要用到在首页根据调... 2021-07-22
批量删除织梦dedecms文档搜索关键词的方法本文实例讲述了使用SQL命令语句批量删除织梦DEDECMS搜索关键词的... 2021-07-27
dede 标签调用大全 dedecms 隔五行一个分割线等标签调用dede 标签调用大全 dedecms 隔五行一个分割线等标签调用,需... 2021-08-09
织梦首页调用随机文章定时自动更新,提高收录速度及权重相信做过SEO的站长朋友都知道网站首页内容的更新频率直接决定了网站的收... 2021-07-22
织梦dedecms 提示 body has not allow words 问题解决此句body has not allow words!英文的意思,大概... 2021-07-22
详解织梦模板[field:global name=autoindex/]标签的使用有时候我们需要在dede:list或者dede:arclist里面为列... 2021-07-22
织梦dedeCMS文章关键词长度修改的方法第一步:数据表修改 首先将数据表中的keyword的varchar()... 2021-07-27
织梦源码还原数据后网站打不开解决方案织梦源码还原数据后 首页能打开 内页打不开 这个问题基本是由于没有更新... 2021-09-25
织梦dedecms内容模型自定义字段给编辑页面添加变量在使用织梦建站时,有时候我们在编辑页面时可能需要单独调用一些变量,而织... 2021-07-27
dedecms任意页面调用指定栏目内容的方法我们在使用dedecms 织梦模板 建站的时候,经常把内容写到栏目内容... 2021-07-22

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