帝国cms后台里的公共模板_相关信息模板默认只支持:

标题: [!–title–],标题alt:[!–oldtitle–], 标题链接: [!–titleurl–]
发布时间: [!–newstime–], 标题图片: [!–titlepic–]

这几个系统标签,那想要添加更多的支持标签应该怎么修改呢?查看以下教程:

修改文件路径:/e/class/functions.php

查找://替换相关链接模板

添加:

	$temptext=str_replace("[!--onclick--]",$r[onclick],$temptext);
	
	$temptext=str_replace("[!--smalltext--]",$r[smalltext],$temptext);
	
	$lanmuming=$class_r[$r[classid]][classname];
	
	$temptext=str_replace("[!--classname--]",$lanmuming,$temptext);

	$lanmuurl=$class_r[$r[classid]][classpath];
	$temptext=str_replace("[!--classurl--]",$lanmuurl,$temptext);

然后搜索://取得相关链接模板

在上面检索条件加上想要显示的标签名,比如smalltext,onclick

 

这样就公共模板 – 相关信息模板里就可以用了。

[!--empirenews.listtemp--]
<li><a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]/
缩略图:[!--titlepic--]/
点击:[!--onclick--]/
简介:[!--smalltext--]/
栏目名:[!--classname--]/
栏目地址:/[!--classurl--]/</a></li>
[!--empirenews.listtemp--]

 

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。