首页
开发手册
应用中心
工具
用户中心
Ease Template Special Cycle
English
中文简体
English
上一篇
下一篇
### Ease Template Special Cycle Ease Template Provides two special types of looping methods. 1. loop table wrap 2. cycle table color change #### >> Loop Table Wrap For example, if we want to make a table that wraps every 2 cells, we need to use row usage at this time. Method description: {row: number of rows, color} A. Wrap every 2 columns of the table. Usage: {row:2} B. The usage of changing colors in every 2 columns of the table:{row:2,#ffffff:#dcdcdc} Means that each line displays two, if you set the independent wrap content, you can set the color of each line. **Example:** test_7.php ``` set_file('test_7'); $tpl->p(); ?> ``` view/test_7.htm ``` normal line break
{v}
{row:2}
Wrap to change color
{v}
{row:2,#ffffff:#dcdcdc}
``` ------------ #### >> Color conversion method If we want to make a table with one row of gray and one row of white, we need to use the color changing method. Method description:{color:First color, second color} tble row color change usage:{color:#dcdcdc,#ffffff} **Example:** test_8.php ``` set_file('test_8'); $tpl->p(); ?> ``` The following template describes two effects. view/test_8.htm ``` Change colors alternately
{_i}.{v}
Combine table wrap and change color
{_i}.{v}
{row:2}
```