How to create drop down in magento

I am new on Magento.I need your help.I want to create a dropdown for menu in magento.When we take mouse oven main menu it will show drop down that display sub menu.

Header navigation manage by top.phtml

location:app/design/frontend/default/shalu_theme/template/catalog/navigation/top.phtml

In header its shows three main category and also showing sub category on frontend.
In admin I am having three main category given below

Admin->Catalog->Select Manage Category

      CATEGORY:
              Furniture(6)
              Electronics(42)
              Apparel(66) 

I want to create a drop down menu mean that these three main category as a main header
navigation.And sub category should be shown in drop down.

Please provide help .I shall be very thankful to you all

Thanks
Shalu

2 thoughts on “How to create drop down in magento”

  1. Well ofcorse this is possible, but it isn’t really a “Magento” thing to show a “dropdown” menu.

    By default Magento is showing a tree in the 'page/html/header.phtml' where $this->getchild('topmenu') is loaded. From there you can play with CSS/JS to make it a dropdown menu you wish.

  2. Add this code

    <option value="<?php echo $this->getOrderUrl('name', 'asc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
    Name A-Z
    </option>
    
    <option value="<?php echo $this->getOrderUrl('name', 'desc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
    Name Z-A
    </option>
    
    <option value="<?php echo $this->getOrderUrl('price', 'asc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
    Price - Low to High
    </option>
    
    <option value="<?php echo $this->getOrderUrl('price', 'desc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
    Price - High to Low
    </option>
    
    <option value="<?php echo $this->getOrderUrl('entity_id', 'desc') ?>"<?php if($this->isOrderCurrent('entity_id') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>
    Newest Products
    </option>
    
    <option value="<?php echo $this->getOrderUrl('entity_id', 'asc') ?>"<?php if($this->isOrderCurrent('entity_id') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>
    Oldest Products
    </option>
    

Leave a Reply

Your email address will not be published. Required fields are marked *