一起源码网

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 织梦CMS 查看主题

有seotitle的时候显示seotitle没有则显示默认标题

发布者: soccerboy | 发布时间: 2018-7-8 07:00| 查看数: 4920| 评论数: 1|帖子模式

dedecms栏目标题seo:有seotitle的时候显示seotitle没有则显示默认标题
{dede:field name=’typeid’ runphp=’yes’}
$id=@me;
global $dsql;
$sql=”select * from dedecode_com_arctype where id=$id”;
$row=$dsql->getOne($sql);
$seotitle=$row["seotitle"];
$typename=$row["typename"];
$topid=$row["topid"];
if($seotitle!==”){
@me=$seotitle;

}else{
$sql2=”select * from dedecode_com_arctype where id=$topid”;
$row2=$dsql->getOne($sql2);
$typename2=$row2["typename"];
@me=$typename2.”-”.$typename;
}

{/dede:field}- {dede:global name=’cfg_webname’/}
将以上代码替换默认的标题 就可以了。这样标题更加试用,方便了栏目过多,有一些栏目没有必要单独写SEOtitle。

最新评论

aa469443238 发表于 2022-7-4 23:42
从后台源代码里下载音乐

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表