开发者

Generate a left hand menu for product categories in Magento

开发者 https://www.devze.com 2022-12-25 03:21 出处:网络
I\'m looking for a method to generate a l开发者_运维技巧eft hand menu in Magento much like the top menu present in the default template, anyone have a method for doing this?Hy,

I'm looking for a method to generate a l开发者_运维技巧eft hand menu in Magento much like the top menu present in the default template, anyone have a method for doing this?


Hy,

there are some extensions and wiki entries which should help fulfill your needs. See some possible solutions here (all can be found, if you look for vertical navigation in Magento Boards):

Vertical Navigation with CSS Classes

How to create a vertical left hand menu

M


If you don't want to muck around with the PHP templates, here is how I've done it using JavaScript (jQuery):

<style>
    #left-nav {float:left; width:160px;border:1px solid #000; border-width:1px 1px 0;margin-right:8px;}
    #left-nav li {border-bottom:1px solid #000;}
    #left-nav a {display:block; text-decoration:none; background:#FFF; color:#000; padding:8px;}
    #left-nav a:hover {color:#FFF; background:#000;}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
    $(function(){
        $('<ul id="left-nav" />')
          .html($("#nav").html())
          .find("li")
          .removeClass("level0")
          .prependTo("#main");
        $(".header-nav-container").hide();
    });
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消