在使用織夢(mèng)建站的時(shí)候如果是中英文版本的網(wǎng)站,分頁(yè)就需要對(duì)應(yīng)英文地址,該怎么使用Dreamweaver實(shí)現(xiàn)織夢(mèng)的中英文分頁(yè)功能呢?下面我們就來(lái)看看詳細(xì)的教程。
1、網(wǎng)站根目錄找到include/arc.listview.class.php用Dreamweaver打開(kāi),找到(約45行)var $remoteDir;在其下面加上一個(gè)新行var $pagelang;

2、繼續(xù)找到(約528行)$list_len = trim($ctag->GetAtt("listsize"));在其下面加上一個(gè)新行$pagelang = trim($ctag->GetAtt("pagelang"));

3、找到(約531行)
if($list_len=="") { $list_len = 3; }在其下面增加
if($pagelang==""){$pagelang = 'cn';}
4、修改(約545行)
$this->dtp->Assign($tagid,$this->GetPageListST($list_len,$listitem));為$this->dtp->Assign($tagid,$this->GetPageListST($list_len,$listitem,$pagelang));

5、修改
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno")為function GetPageListST($list_len,$listitem="index,end,pre,next,pageno",$pagelang='cn')

6、修改
return "<li><span class=/"pageinfo/">共 <strong>1</strong>頁(yè)<strong>".$this->TotalResult."</strong>條記錄</span></li>/r/n";
為
if($pagelang=='cn') {return "<li><span class=/"pageinfo/">共 <strong>1</strong>頁(yè)<strong>".$this->TotalResult."</strong> 條記錄</span></li>/r/n";}else{return "<li><span class=/"pageinfo/">Total <strong>1</strong>Page<strong> ".$this->TotalResult."</strong> Records</span></li>/r/n";}修改
return "<li><span class=/"pageinfo/">共 <strong>0</strong>頁(yè)<strong>".$this->TotalResult."</strong>條記錄</span></li>/r/n";
為
if($pagelang=='cn') {return "<li><span class=/"pageinfo/">共 <strong>0</strong>頁(yè)<strong>".$this->TotalResult."</strong>條記錄</span></li>/r/n";}else{return "<li><span class=/"pageinfo/">Total <strong>0</strong> Page <strong> ".$this->TotalResult."</strong> Records</span></li>/r/n";}修改
$maininfo = "<li><span class=/"pageinfo/">共 <strong>{$totalpage}</strong>頁(yè)<strong>".$this->TotalResult."</strong>條</span></li>/r/n";為



7、依照上面的方法,依次修改下面的獲取上一頁(yè)、主頁(yè)、下一頁(yè)、末頁(yè)的內(nèi)容。
打開(kāi)列表模板頁(yè)面,我這以list_article_en.htm為例,其中l(wèi)ist_article_en.htm為英文版的列表頁(yè)面模板,中文版的可以不用修改
修改{dede:pagelist listsize='5'/}為{dede:pagelist pagelang='en' listsize='5'/}
重新生成列表頁(yè)成功。不過(guò)還有一點(diǎn)美中不足的地方是雖然已經(jīng)實(shí)現(xiàn)了列表頁(yè)的全英文分頁(yè)了

以上就是dede織夢(mèng)cms實(shí)現(xiàn)中英文分頁(yè)功能的方法,希望大家喜歡,請(qǐng)繼續(xù)關(guān)注武林網(wǎng)。
相關(guān)推薦:
DW怎么設(shè)置網(wǎng)站的背景圖像?
Dreamweaver怎么給網(wǎng)站添加一個(gè)動(dòng)態(tài)橫幅效果?
Dreamweaver8怎么做一個(gè)網(wǎng)站維護(hù)自動(dòng)跳轉(zhuǎn)的html網(wǎng)頁(yè)?
新聞熱點(diǎn)
疑難解答
圖片精選