帝国CMS内容页Title显示标题还是副标题的简单判断

2020-01-1517:21:25网站建设与开发Comments2,437 views字数 184阅读模式

当内容有副标题时,显示副标题,当有没有副标题时,显示标题:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/17704.html

<title><?php echo $navinfor['ftitle']?$navinfor['ftitle']:$navinfor['title'] ?></title>

如果要在内容页正文中做此判断,用灵动标签来实现,代码如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/17704.html

<?=$bqr[ftitle]?$bqr[ftitle]:$bqr[title]?>
文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/17704.html
  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/cms/17704.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定