原文来自:https://liye5.com/
<div class="tabs">
[e:loop={"select classid,classname from {$dbtbpre}enewsclass where classid in($public_r[add_zhann_home_classid1]) order by myorder,classid asc",0,24,0}]
<?php
$style = '';
if($bqno==1) $style="active";
?>
<div class="tab <?=$style?>"><?=$bqr[classname]?></div>
[/e:loop]
</div>
解释:获取扩展变量add_zhann_home_classid1
扩展变量里的栏目ID
if($bqno==1) $style="active";
如果是第一个,样式为active