网上很多添加英文栏目标题的方法,大家自己去百度一下就好,但是修改之后在chanel标签中是调用不了的,那么解决办法如下:
想要在channel 中使用,例如:
{dede:channel type='son' row='10' typeid='1'}
则还要修改一个文件,找到include\taglib\channel.lib.php
第一处:if($type=='top') { $sql = "SELECT id,typename,typenameng,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath From `#分隔符@__arctype` WHERE reid=0 And ishidden<>1 order by sortrank asc limit 0, $line "; } else if($type=='son') { if($typeid==0) return ''; $sql = "SELECT id,typename,typenameng,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath From `#分隔符@__arctype` WHERE reid='$typeid' And ishidden<>1 order by sortrank asc limit 0, $line "; } else if($type=='self') { if($reid==0) return ''; $sql = "SELECT id,typename,typenameng,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `#分隔符@__arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; }第二处://如果用子栏目模式,当没有子栏目时显示同级栏目 if($type=='son' && $reid!=0 && $totalRow==0) { $sql = "SELECT id,typename,typenameng,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `#分隔符@__arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; $dsql->SetQuery($sql); $dsql->Execute(); }
当前栏目调用
//处理同级栏目中,当前栏目的样式。currentstyle中的调用include\taglib\channel.lib.php 140行 $linkOkstr = str_replace("~typename~",$row['typename'],$linkOkstr);下面添加$linkOkstr = str_replace("~typenameen~",$row['typenameen'],$linkOkstr);