Magento 1.7:Show category image on category page in full width in a 2 column template

Magento 1.7:Show category image on category page in full width in a 2 column template

July 14, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento 1.7:Show category image on category page in full width in a 2 column template

Solving Category Image Display Issues in Magento 1.7

Magento is an incredibly powerful e-commerce platform, but it can sometimes present challenges when trying to customize the layout of your storefront, especially for older versions like 1.7. In this post, we’ll tackle a common issue: displaying the category image at full width above both columns on a two-column template.

Understanding the Category Image Block

In Magento 1.7, the catalog/category_image block is responsible for rendering the category image in the category view template (category/view.phtml). By default, this block is placed inside the product_list block, which sits within the content area of your layout.

Modifying the Layout XML

To move the category image above both columns and display it at full width, you’ll need to modify the layout XML definition for your category page. Open your catalog.xml file located in your theme directory (or Magento’s core if you haven’t overridden it).

You should find a section that looks like this:

<reference name="content">
    <block type="catalog/category_view" name="category_products" template="catalog/category/view.phtml">
        <!-- Other blocks here -->
    </block>
</reference>

To move the category image block above both columns, you need to add it as a sibling of the category_products block instead of inside it. Update your XML like this:

<reference name="content">
    <block type="catalog/category_image" name="category.image" template="catalog/category/image.phtml"/>

    <block type="catalog/category_view" name="category_products" template="catalog/category/view.phtml">
        <!-- Other blocks here -->
    </block>
</reference>

This code moves the catalog/category_image block outside of category_products, ensuring it appears before any products.

Creating the Image Template

Next, you need to create a new PHTML file for your category image layout. In your theme directory (or Magento’s core if you haven’t overridden it), navigate to the following path:

app/design/frontend/<your_package>/<your_theme>/template/catalog/category/

Create a new file called image.phtml. This is where you’ll define how your category image should be displayed.

Add the following code to this file:

<div class="category-image">
    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'category_image')->resize(1920, 400); ?>" alt="<?php echo $this->escapeHtml($this->getCategory()->getName()) ?>" />
</div>

This code uses Magento’s image helper to resize the category image to a width of 1920 pixels and a height of 400 pixels. The category_image refers to the category image specified in your admin panel.

Flushing Cache

Don’t forget to flush your cache after making these changes. In your Magento backend, navigate to System > Configuration > Advanced > System > Cache Management. Select all cache types and click “Flush Cache Storage”.

Conclusion

With these steps, you should now see your category image displayed at full width above both columns in your two-column template.

Remember, if you’re customizing an older version of Magento like 1.7, always refer to the official documentation for specific instructions relevant to your platform. For more advanced customizations and support, consider consulting with professional developers or service providers like Laravel Company.

Happy coding!

Magento 1 Catalog Themes Errors

Our network