<div class="aside-mod-bd">
{{foreach from=$info['lb_advert'] key=i item=lb}}
{{if $i % 4 == 0}}
<ul class="sliderlist">
{{/if}}
<li><a href="{{$lb->url}}" target="_blank"><img src="{{$lb->pic}}" class="_thumb" /></a></li>
{{if $i % 4 == 3}}
</ul>
{{/if}}
{{/foreach}}
</div>
转载于:https://www.cnblogs.com/qushaoye2009/p/5354226.html