迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
首页栏目循环: 每循环三次添加一次<ul> </ul>
一直写的不对。
怎么判断最后一次的数值呢?
<div class="left">
<ul class="leftbox">
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx1</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx2</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx3</a></li>
</ul>
</div>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx4</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx5</a></li>
</div【老男孩】1楼
{list action=category module=share pid=0} <div class="menu"> <a target="_blank" href="{$t.url}" title="{$t.name}">{$t.name}</a> <div class="SubmenuBox cf"> {list action=category module=share pid=$t.id return=t2} /**这里是循环部分**/ {if $key_t2%3==0} <div class="left"> <ul class="leftbox"> {/if} <li class="submenu"> <a target="_blank" href="{$t2.url}" class="nav-link nav-toggle " title="{$t2.name}">{$t2.name}</a></li> {if $key_t2%3==2} </ul> </div> {/if} /**这里是循环部分**/ {/list} </div> </div> {/list}
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx1</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx2</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx3</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx4</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx5</a></li>
----------------------------------------------------------------------------------------------------------------------------------------------
///结束!,没有下面的结束标签。
</div
<div class="left">
<ul class="leftbox">
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx1</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx2</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx3</a></li>
</ul>
</div>
<div class="left">
<ul class="leftbox">
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx4</a></li>
<li class="submenu"> <a href="#" class="nav-link nav-toggle " title="#">xxxxx5</a></li>
</ul>
</div【老男孩】1楼
<div class="left">
<ul class="leftbox">
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx1</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx2</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx3</a></li>
</ul>
</div>
<div class="left">
<ul class="leftbox">
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx4</a></li>
<li class="submenu"> <a target="_blank" href="#" class="nav-link nav-toggle " title="#">xxxxx5</a></li>
----------------------------------------------------------------------------------------------------------------------------------------------
///结束!,没有下面的结束标签。
</ul>
</div