I want to display all catalog names from all the levels and I am using the following code and it shows the category at level 1 and I want a nested menu to be displayed
the following is the code snippet
<select id="<?php echo $categorySearchHelper->getCategoryParamName() ?>" name="<?php echo $categorySearchHelper->getCategoryParamName() ?>">
<option value=""><?php echo $this->__('All') ?></option>
<?php foreach ($this->getSearchableCategories() as $mainCategory): ?>
<option value="<?php echo $mainCategory->getEntityId()?>"><?php echo $mainCategory->getName() ?></option>
<?php if ($categorySearchHelper->showSubCategories()) : ?>
<?php foreach ($this->getSearchableSubCategories($mainCategory) as $category) : ?>
<option value="<?php echo $category->getEntityId()?>"><?php echo $categorySearchHelper->getIndentationText() . $category->getName()?></option>
<?php endforeach;?>
<?php endif ?>
<?php endforeach;?>
</select>
Please help