您当前的位置: 主页 > 优化教程
在英文站中列表分页导航出现“首页 上一页 下一页 末页”,当前位置:首页>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的dede:channelartlist语句解除指定typeid在做 织梦模板 时,在行使 dede:channelartlist 自... 2021-07-22
dedecms限制会员每天投稿数量方法在php空间中建一个网站着实不容易。作为一站长、网站管理员,最烦恼的莫... 2021-07-30
织梦DEDECMS内容页调用当前栏目名称的标签其中 {dede:field function=GetTypeName... 2021-07-22
dedecms如何去掉域名后面的index.html为什么要去掉导航链接里的index.html? 虽然说这两个链接的意思... 2021-07-22
dede5.7当前位置{dede:field.position}的修改方法一、修改{dede:field name=position/}的文字间... 2021-07-27
织梦自由列表freelist调用增加排序方法很多站长在用到织梦的自由列表功能时,会发现其排序方式比较单一,不能满足... 2021-07-22
织梦dedecms后台添加图片style全部都变成st&amp;lt;x&amp;gt;yle的解决办法织梦dedecms图集自定义字段里面传的图片代码都会变成yle=wid... 2021-07-22
dedecms自动审核会员发表的最新文章实现方法本文介绍了dedecms中自动审核会员发表的最新文章的方法,DEDE的... 2021-07-22
DEDECMS教程:列表页缩略图随机调用如果用过DEDECMS的朋友应该都知道,有些模板列表页面需要用到缩略图... 2021-07-30
Dedecms总结:如何取消各种登录验证码显示使用dedecms建站的朋友想必程序都升过级了吧,当然了,有新版本肯定... 2021-07-30
织梦文章页原创Meta声明标注在添加这个标签的时候,余斗发现一个问题,就是页面的生成格式默认为:20... 2021-07-22
织梦dedecms留言板自动发邮件通知网站管理员这个主要是利用织梦内置的发邮件类mail.class.php,其中很简... 2021-07-27
织梦如何给内容标题添加图片备用文字属性的方法织梦dedecms程序建站方便,优化起来也非常方便,很多站长朋友都使用... 2021-08-14
织梦dede短标题调用,dede简略标题调用在网站建设中,织梦dede通常都是调用标题出来,但有时候也会用到调用简... 2021-07-22
dede后台左侧菜单空白或不显示的解决办法(完美解决)安装好dedecms后,进入后台你发现左边菜单一片空白,显示不出来,这... 2021-07-22
dedecms列表页首页调用下载地址的办法总结直接在include/helpers/extends.helps.ph... 2021-07-27
dedecms教程:织梦出现\dedesql.class.php 的解决方法安装dede,UTF-8时,最后不能显示网站后台和首页,报错了! 登陆... 2021-07-22

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