码迷,mamicode.com
首页 > 其他好文 > 详细

tramsy模板引擎(完善中)

时间:2017-07-22 17:00:17      阅读:276      评论:0      收藏:0      [点我收藏+]

标签:input   key   out   inf   value   back   arch   data   pos   

(1)form表单

<form class="form-horizontal row" role="form" action="<{url route=‘shopadmin‘ app=sysfinance ctl=‘admin_tradeList‘ act=index}>" method="post">
<{input type="text" id="shop_name" name="shop_name" value=$shop_name }>
<{button id=‘index-form-submit‘ type="submit" label="搜索"|t:‘search‘}>
</form>

(2)foreach遍历

打印数组:<{json from=$data}>

<{foreach from=$data item=value key=key}>
<tr>
<td><{$value.CreateTime}></td>
</tr>
<{/foreach}>

(3)radio选中状态

<tr>
<th><{t}>是否启用:<{/t}></th>
<td>
<div class=‘prop_type‘>
<label><input type="radio" name="disabled" value="0" <{if $brandInfo.disabled == 0}> checked <{/if}> /><{t}>是<{/t}></label>
&nbsp; &nbsp;
<label><input type="radio" name="disabled" value="1" <{if $brandInfo.disabled == 1}> checked <{/if}> /><{t}>否<{/t}></label>
</div>
</td>
</tr>

tramsy模板引擎(完善中)

标签:input   key   out   inf   value   back   arch   data   pos   

原文地址:http://www.cnblogs.com/buysweet/p/7221428.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!