//文章列表循环输出判断 {{$set=array()}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} {{if $a['key']==1}} 第一条:<a href="{{$a['link']}}">{{$a['title']}}</a> {{elseif $a['key']==2}} 第二条:<a href="{{$a['link']}}">{{$a['title']}}</a> {{else}} 其它:<a href="{{$a['link']}}">{{$a['title']}}</a> {{/if}} {{/loop}} //第一篇文章输出样式为article1 {{$set=array()}} {{$set['rowstyle'][1]=' class\="article1"'}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} <a href="{{$a['link']}}"{{$a['rowstyle']}}>{{$a['title']}}</a> {{/loop}} //也可同时设置多篇文章输出指定样式 {{$set=array()}} {{$set['rowstyle'][1]=' class\="article1"'}} {{$set['rowstyle'][2]=' class\="article2"'}} {{$set['rowstyle'][3]=' class\="article3"'}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} <a href="{{$a['link']}}"{{$a['rowstyle']}}>{{$a['title']}}</a> {{/loop}} //每隔4篇文章输出指定样式 {{$set=array()}} {{$set['stepstyle'][4]=' class\="margin_right_0"'}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} <a href="{{$a['link']}}"{{$a['stepstyle']}}>{{$a['title']}}</a> {{/loop}} //当id等于1时输出指定样式 {{$set=array()}} {{$set['rowidstyle'][1]=' class\="no"'}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} <a href="{{$a['link']}}"{{$a['rowidstyle']}}>{{$a['title']}}</a> {{/loop}} //当title等于"测试标题"时输出指定样式 {{$set=array()}} {{$set['rowidstyle']['测试标题']=' class\="no"'}} {{$set['rowidname']='title'}} {{$articles=alist($set)}} {{loop $articles['list'] as $a}} <a href="{{$a['link']}}" {{$a['rowidstyle']}}>{{$a['title']}}</a> {{/loop}}