您当前的位置:首页 > 建站学习

DEDECMS织梦内容页调用seotitle标题的写法

时间:2023-03-04 00:01:04
首先方法一,直接用织梦的sql实现:<title>{dede:field name='typeid' runphp='yes'}[email protected];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/}不想修改文件直接用***种方法,喜欢动手的可以采用第二种方法,个人推荐采用第二种方法。

方法

最新文章