<foreach name="list" item='v'>
<tr>
<td><img class="user" src='{$v.member_id | getMemberAvatar}'></td>
<td style="font-size: 1.25em; padding-top: 1em;" class="hidden-xs text-muted">{$v.member_name}</td>
<td style="font-size: 1.25em; padding-top: 1em;" class="hidden-xs text-muted">
<if condition='($v.member_sex eq 1)'>男
<elseif condition='($v.member_sex eq 2)'/>女
<else />不公开
</if>
</td>
<td style="font-size: 1.25em; padding-top: 1em;" class="hidden-xs text-muted">{$v.add_time}</td>
</tr>
</foreach>
还有一种用法,是关于下拉框的:
<form method="post" enctype="multipart/form-data"> <input type="hidden" name="id" value='{$list.0.fulltime_id}'/> <th>审核状态 :</th> <td><select name="status"> <option value ="0" <if condition="($list[0][fulltime_status] eq 0)">selected="selected"</if> >审核中</option> <option value ="1" <if condition="($list[0][fulltime_status] eq 1)">selected="selected"</if> >已发布</option> <option value ="2" <if condition="($list[0][fulltime_status] eq 2)">selected="selected"</if> >被删除</option> </select></td> </form>