帝国cms模板教程(帝国cms简介标签)
将调用代码添加到内容页模板中
?php$ecms_bq_sql=sys_ReturnEcmsLoopBq('从[!db.pre!]enewstagsdata 中选择*,其中classid='$navinfor[classid]' 和id='$navinfor[id]' 按tagid 排序',10,24,0) ;$bqno=0;while($bqr=$empire-fetch($ecms_bq_sql)){$bqsr=sys_ReturnEcmsLoopStext($bqr);$bqno++;php$ecms_bq_sql2=sys_ReturnEcmsLoopBq('select * from [!db.pre !]enewstags where tagid='$bqr[tagid]' order by tagid',1,24,0);$bqno2=0;while($bqr2=$empire-fetch($ecms_bq_sql2)){$bqsr2=sys_ReturnEcmsLoopStext($bqr2);$bqno2++;li class='tag-?=$bqno?'a href='/e/tags/?tagname=?=urlencode($bqr2[标签名])?'?=$bqr2[标签名]?/a/li ?php}}?
自己写的css代码
.tag-1{background:#ff7094;}.tag-2{background:#94b770;}.tag-3{background:#db94ff;}.tag-4{background:#399;}.tag-5{background:#f60;}