近在做中韓文網(wǎng)站,涉及到多語言的頁碼,之前麥站發(fā)布過一篇教程通過修改include下的arc.listview.php文件可以實(shí)現(xiàn),其實(shí)那種方法小編還是認(rèn)為比較復(fù)雜的,那么如果通過模板中直接調(diào)用實(shí)現(xiàn)英文頁碼,不用修改文件呢,你只需要用到織夢的替換函數(shù):str_replace 就可以實(shí)現(xiàn)。方法如下:
列表分頁:
{dede:pagelist listitem="index,end,pre,next,pageno" listsize="1" function="str_replace(array('首頁','上一頁','下一頁','末頁','共','頁','條記錄'),array('Home','Pre','Next','Last','Total','Page','Records'),@me)"/}
|
文章頁上一篇/下一篇:
{dede:prenext get='pre' function="str_replace(array('上一篇','沒有了'),array('PREVIOUS','Nothing'),@me)"/}
{dede:prenext get='next' function="str_replace(array('下一篇','沒有了'),array('NEXT','Nothing'),@me)"/}
|
當(dāng)前位置:
<a href="/">Home</a> > {dede:type'}<a href="[field:typelink /]">[field:typename /]</a>{/dede:type}
|