Jump to content

[SOLVED]Default Category Images not showing


mickeyboy1

Recommended Posts

I am using 1.6.14 and i have added some new categories via bo but havent added images for them.

 

In front office the default category image is not displaying in these categories.

 

Any ideas people ???

 

thanks in advance mb

 

EDIT:

want to mention that when viewing a main category, then the sub-category image is displayed (I.E medium_default.jpg) 

but when you click on that sub-category, the main image is not showing (I.E category_default.jpg)

Edited by mickeyboy1 (see edit history)
Link to comment
Share on other sites

Hiya Ostore,

 

yes i did manage to get it working.

in themes/YOUR_THEME/category.tpl i changed this 

<div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}>

to this 

<div class="content_scene_cat_bg"{if $category->id_image || !$category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}>

This is just saying " If category has an image assigned OR If category hasnt an image assigned" then .......

 

Maybe not the best way but it works for me 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...