topmenu display in select box in magento

 
Replace topmenu.phtml with following code: 
 
<div class="header-nav-container">
  <div class="header-nav">
  <select class="browser_box" name="browser" onchange="location = this.options[this.selectedIndex].value;">
      <option>Please select a category...</option>
<?php
  $obj = new Mage_Catalog_Block_Navigation();
  $store_cats = $obj->getStoreCategories();
  $current_cat = $obj->getCurrentCategory();
  $current_cat = (is_object($current_cat) ? $current_cat->getName() : '');
 
  foreach ($store_cats as $cat) {
          echo '<option value="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</option>";
  }?>
    </select>
  </div>
</div>

Comments