Hello,
Get categories list which are not include in Navigation in magento.
Some time you want that are not added in navigation but categories active and you want to
get or listing.
<ul class="full_category">
<?php $_categories = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('*')
->addAttributeToFilter('is_active', 1) //only active categories
->addAttributeToFilter('include_in_menu', 0)
->addAttributeToSort('position');//sort by position
foreach ($_categories as $_category) { ?>
<li class="cat">
<a href="<?php echo $_helper->getCategoryUrl($_category) ?>" title="<?php echo $_category->getName() ?>"><strong class="strongsm"><?php echo $_category->getName() ?></strong></a>
</li>
<?php }?>
</ul>
Get categories list which are not include in Navigation in magento.
Some time you want that are not added in navigation but categories active and you want to
get or listing.
<ul class="full_category">
<?php $_categories = Mage::getResourceModel('catalog/category_collection')
->addAttributeToSelect('*')
->addAttributeToFilter('is_active', 1) //only active categories
->addAttributeToFilter('include_in_menu', 0)
->addAttributeToSort('position');//sort by position
foreach ($_categories as $_category) { ?>
<li class="cat">
<a href="<?php echo $_helper->getCategoryUrl($_category) ?>" title="<?php echo $_category->getName() ?>"><strong class="strongsm"><?php echo $_category->getName() ?></strong></a>
</li>
<?php }?>
</ul>
0 komentar:
Post a Comment