webstermobile
Fork me on GitHub
个人博客

ECSHOP仿京东商品分类树代码

<div id="category_tree">
  <!--{foreach from=$categories item=cat name=no}-->
<!--<div style="clear:both; height:2px; line-height:2px; background:url(../images/category_line.png) repeat-x;"></div>-->
  <div class="dt" onMouseOver="sw_nav2({$smarty.foreach.no.iteration},1);" onMouseOut="sw_nav2({$smarty.foreach.no.iteration},0);">
  <dl id="HandleLI2_{$smarty.foreach.no.iteration}" >
  <div class="deep">
    <dt> <a href="{$cat.url}"> {$cat.name|escape:html} </a> </dt>
    <!--{foreach from=$cat.cat_id item=child name=name}-->
    <!--{if $smarty.foreach.name.iteration lt 7}-->
    <dd> <a href="{$child.url}">{$child.name|escape:html}</a>
    </dd>
    <!--{/if}-->
    <!--{/foreach}-->
    </div>
    <ul id="DisSub2_{$smarty.foreach.no.iteration}" style="display:none; z-index:99;">
       
      <!--{foreach from=$cat.cat_id item=child name=childs}-->
      <li><div class="clearfixl"><a class="over_2" href="{$child.url}">{$child.name|escape:html}</a></div>
       <div  class="clearfix {if $smarty.foreach.childs.last}clearfix1{/if}">
      <!--{foreach from=$child.cat_id item=childer}-->
      <a class="over_3" href="{$childer.url}">{$childer.name|escape:html}</a>
      <!--{/foreach}-->
    </div></li>
  <!--{/foreach}-->
    
  </ul>
  </dl>
  </div>
  <!--{/foreach}-->
</div>

 

posted @ 2014-04-09 18:29  wpindesign  阅读(1961)  评论(0编辑  收藏  举报