在帝国CMS里如果填写了栏目别名以后,那么栏目列表内容模板(list.var)调用栏目名称标签[!–this.classname–]实际上是调用的栏目别名,这个不知道算不是帝国CMS的BUG还是故意这样做的!解决方法就是用SQL单独查询输出一个栏目名称就好了,具体代码如下:
$cl=$empire->fetch1("select classname from phome_enewsclass where classid='$r[classid]'"); $classname=$cl['classname'];
另外还可以这样调用栏目名称(开启使用程序代码):
$listtemp='<li><a href="[!--titleurl--]" target="_blank"><span></span><h3>[!--title--]</h3><p><a href="[!--this.classlink--]" target="_blank">'.$class_r[$r[classid]]['classname'].'</a> [!--newstime--]</p></a></li>';
‘.$class_r[$r[classid]][‘classname’].’ 就是调用栏目名称
I was excited to uncover this website. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every part of it and i also have you bookmarked to look at new things in your site.