欢迎来到润旭源码网
帮助中心

润旭源码网

热门搜索: 企业源码    免费源码   

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

  • 时间:2020-07-24 11:10 编辑: 来源: 阅读:218
  • 扫一扫,手机访问
摘要:首先方法一,直接用织梦的sql实现: <span style="font-size:14px;">1<title>{dede:field name='typeid' runphp='yes'}$id=@me;global $dsql;$sql="select seotitle from dede_arctype where id=$id&qu

首先方法一,直接用织梦的sql实现:

 

<span style="font-size:14px;">1

<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>

</span>

 

第二种方法,需要修改下include/arc.archives.class.php 这个文件,找到:

 

<span style="font-size:14px;">1

$this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];

</span>

 

<span style="font-size:14px;">1

$this->Fields['typename'] = $this->TypeLink->TypeInfos['typename'];

</span>

 

在这段的下面添加:

 

<span style="font-size:14px;">1

$this->Fields['seotitle'] = $this->TypeLink->TypeInfos['seotitle'];

</span>

 

调用方法,直接在内容页中写:{dede:field.seotitle/}

 

不想修改文件直接用第一种方法, 喜欢动手的可以采用第二种方法,个人推荐采用第二种方法。


  • 全部评论(0)
资讯详情页最新发布上方横幅
联系我们

QQ:888477 {点击直接联系}

邮箱:runxu123@qq.com

时间:周1——周6 【9:00-23:00

联系客服
购买源码 源码咨询 投诉建议 联系客服
0373-6621888
手机版

扫一扫进手机版
返回顶部