其实是把产品分类树当成一个导航点,插入到导航里面。
可以跟其他导航一起排序。顺便把首页的按钮也放在后台的导航功能放在这里自定义可以排序需要引入jquery和一个menu.css文件和menu.js,其他功能都在按照ecshop的默认函数基础上增加的。生成的代码为:
<div id="sitemenu"><ul class="top_menu"><li class="level-0 top"><a href="index.php">首页</a></li><li id="category-2" class=" level-0 top first"><a href="category-2-b0.html">neil</a></li><li id="category-3" class="parent level-0 top "><a href="category-3-b0.html">CATEGORY2</a><span></span><ul><li id="category-5" class=" level-1 top last"><a href="category-5-b0.html">CATE1</a></li></ul></li><li id="category-4" class=" level-0 top "><a href="category-4-b0.html">CATEGORY3</a></li><li id="category-6" class=" level-0 top "><a href="category-6-b0.html">Magento</a></li><li id="category-7" class="parent level-0 top last"><a href="category-7-b0.html">web</a><span class=""></span><ul style="display: none;"><li id="category-8" class="parent level-1 top first"><a href="category-8-b0.html">PHP</a><span class=""></span><ul style="display: none;"><li id="category-14" class=" level-1 top last"><a href="category-14-b0.html">PHPCMS</a></li></ul></li><li id="category-9" class="parent level-1 top "><a href="category-9-b0.html">HTML</a><span class=""></span><ul style="display: none;"><li id="category-11" class=" level-1 top first"><a href="category-11-b0.html">JQEUTY</a></li><li id="category-12" class=" level-1 top "><a href="category-12-b0.html">CSS</a></li><li id="category-13" class=" level-1 top last"><a href="category-13-b0.html">DIV</a></li></ul></li><li id="category-10" class="parent level-1 top last"><a href="category-10-b0.html">DESIGN</a></li></ul></li><li class="level-0 top"><a href="top_menu">分类目录</a></li><li class="level-0 top"><a href="http://www.ganshuw.com">选购中心</a></li><li class="level-0 top"><a href="message.php">留言板</a></li><li class="level-0 top"><a href="activity.php">优惠活动</a></li><li class="level-0 top"><a href="http://www.jielala.com">网店帮助分类</a></li></ul>< /div>