Magento News
How to make Categories with sub categories not linkable
Should be a simple question. But i’ve got a category list in Magento that has sub categories. And i want to make my categories with subs under then act as a title, instead of a clickable link to that category. So for instance:
Link 1
Link 2
Link 3 (this should be a title)
---Link 1
---Link 2
Link4
I’m getting my categories likes so.
<?php foreach ($helper->getStoreCategories() as $_category): ?>
<li> <a href="<?php echo Mage::getModel('catalog/category')->setData($_category->getData())->getUrl(); ?>" title="<?php echo $_category->getName() ?>"><?php echo $_category->getName() ?></a>
<?php foreach (Mage::getModel('catalog/category')->load($_category->getId())->getChildrenCategories() as $childCategory):?>
<?php echo '<li class="subCats"><a href="'.$childCategory->getUrl().'">'.$childCategory->getName() .'</a></li>'; ?>
<?php endforeach;?>
</li>
<?php endforeach ?>
Any help would be greatly appreciated.
thanks
How to make Categories with sub categories not linkable
Possibly Related Posts:
- Database query different results
- Menu highlight in magento under admin
- magento disable a banner on certain category pages or have a banner with multiple links
- Magento, using ACL for frontend. Possible?
- Magento IE-7 Fix In Windows XP
RSS Feed