ThinkPHP 3.2.2 在 模板中 多重循环嵌套中使用 if 判断标签
2016-09-26 13:16
766 查看
<volist name="list" id="vo">
<tr class='{$vo.help_category_id}'>
<td>{$vo.help_category_id}</td>
<td class='display_name'>{$vo.display_name}</td>
<td></td>
<td></td>
<td>
<span class='addTopic'>
<a href='#' onclick="return false">新增内容</a>
</span>
<span class='cate_enabled state{$vo.is_enabled}'>
<a href='#' onclick="return false"><if condition="$vo['is_enabled'] eq 1">暂停<else/>启用</if></a>
</span>
<span class=''>
<a href='#'>删除</a>
</span>
</td>
</tr>
<!--循环文章-->
<volist name="topic_list" id="topic_vo">
<if condition="$topic_vo.help_category_id eq $vo.help_category_id"> 此处是不能用 "."来写,应该为
<if condition="$topic_vo['help_category_id'] eq $vo['help_category_id']">
<tr>
<td>{$topic_vo.topic_id}</td>
<td></td>
<td>{$topic_vo.title}</td>
<td>{$topic_vo.priority}</td>
<td><span>编辑</span> <span>暂停</span> <span>删除</span></td>
</tr>
</if>
</volist>
</volist>
<tr class='{$vo.help_category_id}'>
<td>{$vo.help_category_id}</td>
<td class='display_name'>{$vo.display_name}</td>
<td></td>
<td></td>
<td>
<span class='addTopic'>
<a href='#' onclick="return false">新增内容</a>
</span>
<span class='cate_enabled state{$vo.is_enabled}'>
<a href='#' onclick="return false"><if condition="$vo['is_enabled'] eq 1">暂停<else/>启用</if></a>
</span>
<span class=''>
<a href='#'>删除</a>
</span>
</td>
</tr>
<!--循环文章-->
<volist name="topic_list" id="topic_vo">
<if condition="$topic_vo.help_category_id eq $vo.help_category_id"> 此处是不能用 "."来写,应该为
<if condition="$topic_vo['help_category_id'] eq $vo['help_category_id']">
<tr>
<td>{$topic_vo.topic_id}</td>
<td></td>
<td>{$topic_vo.title}</td>
<td>{$topic_vo.priority}</td>
<td><span>编辑</span> <span>暂停</span> <span>删除</span></td>
</tr>
</if>
</volist>
</volist>
相关文章推荐
- ThinkPHP 3.2.2 在 volist 多重循环嵌套中使用 if 判断标签
- ThinkPHP 3.2.2 在 volist 多重循环嵌套中使用 if 判断标签
- ThinkPHP关于模板的一些嵌套、IF判断使用
- Django学习____模板中的循环,条件判断,常用的标签,过滤器的使用
- DEDECMS模板中dede标签使用php和if判断语句的方法
- 转载--thinkphp模板中支持php的if else 判断标签
- ThinkPHP 模板 Volist 标签嵌套循环输出多维数组
- ThinkPHP模板Volist标签嵌套循环输出多维数组的方法
- ThinkPHP模板Volist标签嵌套循环输出多维数组的方法
- thinkphp模板中标签<volist>,<if>和 U函数的使用
- ThinkPHP问题收集:模板中使用U方法时无法嵌套大括号,For标签,插入数据,新增的表字段缓存问题
- Thinkphp的volist标签嵌套循环使用教程
- Thinkphp的volist标签嵌套循环使用教程
- thinkphp 模板页面select判断 if标签
- for循环与if判断的嵌套使用
- python web框架Django学习(五)模板中的循环,条件判断,常用的标签,过滤器的使用
- ThinkPHP模板范围判断标签使用
- thinkphp 模板页面select判断 if标签
- c++中的结构化语句 判断语句if 分支语句switch 循环语句 while 和 do while 循环语句for的使用
- python中for、while循环、if嵌套的使用