Question

There is a field in the backend called "Category Heading" that I would like to use instead of "Category Name" under View. Current code is like

<h1 class="cate"><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>

Please guide me how to fetch it. Also, is there simple documentation for all this stuff?

Was it helpful?

Solution

If you are referring to the category title, you can get it like this:

echo $_helper->categoryAttribute($_category, $_category->getMetaTitle(), 'meta_title'); 

If there is a custom field category header, do like this:

Mage::log(print_r($_category->debug(), true), null, 'category.log', true);

and then go to var/log/category.log and you will find there all the info you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top