Jump to content

How to show category images in a non default theme


Recommended Posts

Hello my friends, nice day for all. I have a shop running on localhost. I installed a different theme but the category header images are not being showing. Does anyone know what code I should add (and which file) so I can display the category images?

 

post-719775-0-94943200-1383158231_thumb.jpg

Link to comment
Share on other sites

You must edit category.tpl, find the spot where you want to add the image and insert the following:

				{if $category->id_image}
				<div class="align_center">
					<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
				</div>
				{/if}
Link to comment
Share on other sites

 

You must edit category.tpl, find the spot where you want to add the image and insert the following:

				{if $category->id_image}
				<div class="align_center">
					<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
				</div>
				{/if}

Thanks for you reply Nemo1.

Link to comment
Share on other sites

Nemo's solution works like a charm so it's time to mark this thread as [solved]

@Welisson here is an instruction:

 

 

[sOLVED] Topic
If, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution.
Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED].

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.
Link to comment
Share on other sites

  • 11 months later...
×
×
  • Create New...