帝国cms如何增加标签模板
帝国CMS标签模板是万能标签调用中不可忽视的重要组成,那么标签模板是如何增加的呢
1.标签模板增加路径路径:后台--模板--标签模板--管理标签模板--增加标签模板
2.页面模板内容3.列表内容模板(list.var) (*)[!--empirenews.listtemp--]
<!--list.var1-->
[!--empirenews.listtemp--]
这里我是以标题图片判断,也就是如果有标题图片则显示标题图片样式,没有标题图片,则是没有标题图片样式,如图
这是代码部分,其中,我省略了标签的调用,主要过滤白嫖党,同时加入一级置顶优先显示istop
$titlepic='';
if($r[istop]==1){
$istop='【置顶】';
}
else{
$istop='';
}
if(empty($r[titlepic])){
$titlepic='<h2 class="title"><b>'.$istop.'</b><a href="[!--titleurl--]">[!--oldtitle--]</a></h2>
<p class="smalltext">[!--smalltext--]...</p>
<p class="extra-info"><span>【'.date("Y-m-d",$r[newstime]).'】</span><a href="[!--titleurl--]" class="goto">全文阅读</a></p>';
}if($r[titlepic]){
$titlepic='<h2 class="title"><b>'.$istop.'</b><a href="[!--titleurl--]">[!--oldtitle--]</a></h2><span class="thumbnail imgscale"><a href="[!--titleurl--]"><img src="[!--titlepic--]" alt="[!--oldtitle--]"
title="[!--oldtitle--]" style="max-width: 100%; height: auto;" /></a></span><p class="smalltext">[!--smalltext--]...</p>
<p class="extra-info"><span>【'.date("Y-m-d",$r[newstime]).'】</span><a href="[!--titleurl--]" class="goto">全文阅读</a></p>
';
}
$listtemp='<li>'.$titlepic.'</li>';
帝国CMS7.5内核简洁文章资讯自适应手机HTML5综合类模板源码【内页(文章页、列表)标题,描述,严格的SEO标题规范,利于SEO】
相关推荐
-
帝国cms在首页、列表页、内容页调用TAG标签教程
帝国cms在首页、列表页、内容页调用G标签教程,将代码添加到usrfun.php中
-
帝国cms灵动标签同时调用头条和推荐
方法1、同时调用头条(1级、2级)、推荐(1级、2级)[:loop={0,10,3,0,'isgood=1orfirsttitl=1orisgood=2orfirsttitl=2'}][:loop]注释:调用有头条(1级、2...
-
帝国cms标签tags访问提示您来自的链接不存在
一个网友咨询,他网站调用文章标签,但是访问gs标签时,却提示您来自的链接不存在,这个问题如何解决对于访问gs标签提示您来自的链接不存在,可以理解为没有gs标签列表页,那么如
-
解决 [!--softsay--] 标签 在列表页调用带有 <br /> 的问题
sconnct.php文件查找默认不换行的字段$nottobrf=',nwstxt,titl,titlpic,nwstim,bfrom,writr,downpath,onlinpath,musicpath,booktxturl,';...
-
请问灵动标签如何实现调用去除重复标题?
可以改成下面[:loop={'11,14,17,18,',22,0,0,'firsttitl=0','nwstimDSC'}]