首页 > CMS > 帝国Empire > 正文

帝国cms7.0内容页模板实现多背景tag标签

2024-08-28 12:29:14
字体:
来源:转载
供稿:网友

调用代码 加到内容页模板里

<?php

$ecms_bq_sql=sys_ReturnEcmsLoopBq("select * from [!db.pre!]enewstagsdata where classid='$navinfor[classid]' and id='$navinfor[id]' order by 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[tagname])?>"><?=$bqr2[tagname]?></a></li>

<?php

}

}

?>


css代码 自己写

.tag-1{background:#ff7094;}
.tag-2{background:#94b770;}
.tag-3{background:#db94ff;}
.tag-4{background:#399;}
.tag-5{background:#f60;}



发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表