zoukankan      html  css  js  c++  java
  • eyoucms 点击下拉分类,没有分类的不切换代码

    {eyou:channel type="son" typeid="68" row="10" id="field" currentstyle="inNACtive"}
    
    		<li style="cursor: pointer;" class="{$field.currentstyle}">
    
    			      <a class="pNFirst" href="{$field.typeurl}">{$field.typename}
    					</a>
    
    			{eyou:notempty name="$field.children"}
    
    				{eyou:if condition='($eyou.field.typeid == 82 || $eyou.field.typeid == 86 || $eyou.field.typeid == 88)'}
    
    					<div style="display:block;">
    
    						{eyou:channel name="$field.children" row="100" id="field2"}
    
    						<a href="{$field2.typeurl}">{$field2.typename}</a>
    
    						{/eyou:channel}
    
    					</div>
    
    				{/eyou:if}
    
    			{/eyou:notempty} 
    
    		</li>
    
    {/eyou:channel}
    

      这里我是遍历的其中某个栏目,遍历之后,判断是否有子栏目,有子栏目的话,把遍历的栏目展示出来,那些没有子栏目的不展示。

  • 相关阅读:
    python 代码片段8
    python 代码片段7
    python 代码片段6
    python 代码片段5
    python 代码片段4
    django 代码片段3
    python 代码片段2
    Redis事物
    Redis的java客户端jedis
    Redis五大数据类型
  • 原文地址:https://www.cnblogs.com/programmer-1/p/13065841.html
Copyright © 2011-2022 走看看