Sorting categories in Magento according to the position in admin
<?php $cats = Mage::getModel('catalog/category')->load(3)->getChildrenCategories(); ?> <ul> <?php foreach($cats as $category): ?> <li> <a href="<?php echo $category->getUrl() ?>"><?php echo $category->getName() ?></a> </li> <?php endforeach; ?> </ul>
in here 3 is parent category ID
Advertisement
No trackbacks yet.