smarty 第一条数据判断
<div class="shangpin_rightdiv2">
<p>颜色</p>
<ul id="toggle">
<{section name=type_name loop=$strdata7}>
<{if $smarty.section.type_name.first}>
<li class="sp_li"><{$strdata7[type_name].type_name}></li>
<{else}>
<li><{$strdata7[type_name].type_name}></li>
<{/if}>
<{/section}>
</ul>
</div>
=======================
<div class="shangpin_rightdiv2"> | |
<p>颜色</p> | |
<ul id="toggle"> | |
<li class="sp_li">白色</li> | |
<li>黑色</li> | |
</ul> | |
</div> |