这个需要修改DeDeCMS配置文件,/include/ 和 /include/ 修改前要备份文件哦!
canonical内容页标签:{dede:};canonical列表页标签:{dede:};canonical首页标签:{dede:}。
内容标签修改:搜索”$TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName;“ 在下面添加一段代码:
$TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName;
GLOBAL $cfg_multi_Site;
if($cfg_multi_site=='Y') {
$this->Fields['arcurl'] = $cfg_basehost.$fileFirst."_".$i.".".$this->ShortName;
} else {
$this->Fields['arcurl'] = $fileFirst."_".$i.".".$this->ShortName;
频道标签修改:搜索”$this->PartView->SetTemplet($tempfile);“,在其上面添加一段代码:
if(!file_exists($tempfile))
{
$tempfile =$tmpdir."/".$GLOBALS['cfg_df_style']."/index_";
}
GLOBAL $cfg_multi_site,$cfg_basehost;
if($cfg_multi_site=='Y') {
$this->PartView->Fields['typeurl'] = $cfg_($this->Fields['typedir']);
} else {
$this->PartView->Fields['typeurl'] = MfTypedir($this->Fields['typedir']);
}
$this->PartView->SetTemplet($tempfile);
列表修改标签:搜索“$this->dtp->SaveTo($makeFile);”,在他前面加上一段代码:
if($this->PageNo == 1) {
$this->Fields['typeurl'] = MfTypedir($this->Fields['typedir']);
} else {
$this->Fields['typeurl'] = $murl;
}
GLOBAL $cfg_multi_site,$cfg_basehost;
if($cfg_multi_site=='Y') {
$this->Fields['typeurl'] = $cfg_basehost.$this->Fields['typeurl'];
}
//初步给固定值的标记赋值
$this->ParseTempletsFirst();
$this->dtp->SaveTo($makeFile);