tags:

views:

24

answers:

1

Hi, is is possible to have the main category image that you set in the General Information tab made into a link?

It renders out as:

<img src="http://www.example.com/media/catalog/category/example.jpg" alt="Example" title="Example" class="category-image" />

There is perhaps an extension to do this? It just doesn't feel right to have a main banner that is not clickable...

A: 

Do you want to link it to the same category or some other page? You can try this hack...

Category images are loaded by calling

    <p><?php echo $_imgHtml?></p>

in the template\catalog\category\view.phtml file.

You can make the following change and hardcode a link or use a dynamic link.

    <p><a href="#"><?php echo $_imgHtml?></a></p>

If you want to link it to the current category, you can assign the current category URL function to a $variable and use it as your link.

$_category->getUrl()

If you have a specific requirement, comment on the answer.

Sid Vel