I want to add a picture on top of category name in frontend. I tried creating a custom field for the category and adding a picture that way. I can see the custom field from admin, but I can't see anything I type in the custom textarea on my frontend category name. I tried flushing cache and reindexing data. I also tried adding in app/design/frontend/package/theme/template/catalog/category/view.phtml this code:

<?php if($_customAttribute = $this->getCurrentCategory()->getCustomAttribute()): ?>
    <?php echo $_helper->categoryAttribute($_category, $_customAttribute, 'custom_attribute') ?>
<?php endif; ?>

But when i added it all my products disappeared and I still coundn't see changes to my category name.


 <?xml version="1.0"?>


<?xml version="1.0"?>



$this->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'custom_attribute', array(
    'group'         => 'General Information',
    'input'         => 'textarea',
    'type'          => 'text',
    'label'         => 'Custom attribute',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,


1 Answer 1


It does not seem that programming is necessary to add an image above the items in a category. Here is a simple solution that may meet your requirements.

  1. Create a Static CMS block with your image in it. Menu Item CMS -> Static Blocks
  2. Update the Display Settings for the category where you want to image to appear and add the block.

Here is the navigation:

  1. Catalog -> Manage Categories
  2. Select The category you want to update
  3. Select the Display Settings Tab
  4. Set the Display Mode to Static Block and Products
  5. Set the CMS Block to the Static Block you created for the category.

That's it you are done. Maybe clear the cache if you change does not appear immediately.

Magento is very versatile out of the box with lots of built-in features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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