首先方法一,直接用織夢的sql實現:
<title> {dede:field name='typeid' runphp='yes'} $id=@me; global $dsql; $sql="select seotitle from dede_arctype where id=$id"; $row=$dsql->getOne($sql); @me=$row["seotitle"]; {/dede:field} </title>
第二種方法,需要修改下include/arc.archives.class.php 這個文件,找到:
$this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];
在這段的下面添加:
$this->Fields['seotitle'] = $this->TypeLink->TypeInfos['seotitle'];
調用方法,直接在內容頁中寫:{dede:field.seotitle/}
不想修改文件直接用第一種方法, 喜歡動手的可以采用第二種方法,個人推薦采用第二種方法。