迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
您好 独立模块 怎么判断是否有栏目 有栏目就出现<ul><li></li></ul> 无栏目就不出现<ul><li></li></ul>
{cache name=module-content return=m} {if !$m.share} <li><a href="{dr_url_prefix($m.url)}" title="{$m.name}" {if MOD_DIR==$m.dirname} class="active"{/if}>{$m.name}</a> <span class="toggle-btn"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=0 return=t2} <li><a href="{$t2.url}" title="{$t2.name}">{$t2.name}</a> {if $t2.child} <span class="toggle-btn2"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=$t2.id return=t3} <li><a href="{$t3.url}" title="{$t3.name}">{$t3.name}</a></li> {/category} </ul> {/if} </li> {/category} </ul> </li> {/if} {/cache}
<span class="toggle-btn"><i class="iconfont icon-down"></i></span>
{if !$m.share}
{if !$m.share && $m.category}
{if $ci->get_cache('module-1-模块目录', 'category')} 有栏目 {/if}
这么就好理解,但是原理还是一样,只是判断的位置变化了,
就算我不给你写出来,应该你能理解吧
{cache name=module-content return=m} {if !$m.share} <li><a target="_blank" target="_blank" href="{dr_url_prefix($m.url)}" title="{$m.name}" {if MOD_DIR==$m.dirname} class="active"{/if}>{$m.name}</a> {if !$m.share && $m.category} <span class="toggle-btn"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=0 return=t2} <li><a target="_blank" target="_blank" href="{$t2.url}" title="{$t2.name}">{$t2.name}</a> {if $t2.child} <span class="toggle-btn2"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=$t2.id return=t3} <li><a target="_blank" target="_blank" href="{$t3.url}" title="{$t3.name}">{$t3.name}</a></li> {/category} </ul> {/if} </li> {/category} </ul> {/if} </li> {/if} {/cache}
{cache name=module-content return=m} {if !$m.share} <li><a target="_blank" target="_blank" target="_blank" href="{dr_url_prefix($m.url)}" title="{$m.name}" {if MOD_DIR==$m.dirname} class="active"{/if}>{$m.name}</a> {if !$m.share && $m.category} <span class="toggle-btn"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=0 return=t2} <li><a target="_blank" target="_blank" target="_blank" href="{$t2.url}" title="{$t2.name}">{$t2.name}</a> {if $t2.child} <span class="toggle-btn2"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=$t2.id return=t3} <li><a target="_blank" target="_blank" target="_blank" href="{$t3.url}" title="{$t3.name}">{$t3.name}</a></li> {/category} </ul> {/if} </li> {/category} </ul> {/if} </li> {/if} {/cache}
{cache name=module-content return=m} {if !$m.share} <li><a target="_blank" target="_blank" target="_blank" target="_blank" href="{dr_url_prefix($m.url)}" title="{$m.name}" {if MOD_DIR==$m.dirname} class="active"{/if}>{$m.name}</a> {if $ci->get_cache('module-1-'.$m.dirname, 'category')} <span class="toggle-btn"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=0 return=t2} <li><a target="_blank" target="_blank" target="_blank" target="_blank" href="{$t2.url}" title="{$t2.name}">{$t2.name}</a> {if $t2.child} <span class="toggle-btn2"><i class="iconfont icon-down"></i></span> <ul class="dropdown-nav nav-sb br sub-nav animated-fast fadeInUpMenu clearfix"> {category module=$m.dirname pid=$t2.id return=t3} <li><a target="_blank" target="_blank" target="_blank" target="_blank" href="{$t3.url}" title="{$t3.name}">{$t3.name}</a></li> {/category} </ul> {/if} </li> {/category} </ul> {/if} </li> {/if} {/cache}
这么就好理解,但是原理还是一样,只是判断的位置变化了,
就算我不给你写出来,应该你能理解吧
你不仔细了