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?

  • 1
    You can always dump to see what's available. var_dump($_category) – Tim Hallman Jun 21 '15 at 11:18

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.