Magento: How to get value of custom created category attribute at front side?

September 8, 2010 | In: Magento, web development

According to magento characteristics, we can get the custom created product attributes at front side in easy way by $_product->getCustomCreateAttribute()
But when we create an attribute for an category then magento does not show by $_main_category->getCustomCreateAttribute()
Magento only show the attribute value at front side which created by system or Magento. So for this we have to use below code to show category attribute by forcefully.

    foreach ($this->getStoreCategories() as $_main_category):
	$categoryForcefully = Mage::getModel("catalog/category")->load($_main_category->getEntityId());
    	echo $categoryForcefully->getCustomCreateAttribute();
<?php endforeach;?>

Here, $categoryForcefully is an object of category model/class that load the full category attributes and by this object we can show any attribute value.