10210ken Posted November 21, 2013 Share Posted November 21, 2013 (edited) Hi Can anyone tell me how to remove the images in the sub categories. I am sure there is a simple way but have spent hours looking for it. Thanks Ken Edited November 22, 2013 by 10210ken (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted November 22, 2013 Share Posted November 22, 2013 You will need to edit the category.tpl file located in themes/default. Remove the section shown below starts at line 71. You can also comment out this section by adding {* before and *} after this section which I also show below. {* {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" class="cat_name">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> {if $subcategory.description} <p class="cat_desc">{$subcategory.description}</p> {/if} </li> {/foreach} </ul> <br class="clear"/> </div> {/if} *} 1 Link to comment Share on other sites More sharing options...
10210ken Posted November 22, 2013 Author Share Posted November 22, 2013 Hi Thanks for that, however that removes the sub categories completely. All I want to do is to remove the image box. We do not require images on the sub catagories. Ken Link to comment Share on other sites More sharing options...
vekia Posted November 22, 2013 Share Posted November 22, 2013 if you want to disable category images only, just hide this part of code mentioned above: {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} 1 Link to comment Share on other sites More sharing options...
10210ken Posted November 22, 2013 Author Share Posted November 22, 2013 Thanks a lot. That worked. Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 thank you for confirmation i can mark this topic as [solved] now with regards, Milos edit: oops! you did it first! sorry Link to comment Share on other sites More sharing options...
totallighting.sk Posted November 26, 2013 Share Posted November 26, 2013 Still showing image on subcategory page... Link to comment Share on other sites More sharing options...
10210ken Posted November 26, 2013 Author Share Posted November 26, 2013 Hi If you are not using the default theme you will need to remove it from the theme you are using. Link to comment Share on other sites More sharing options...
vekia Posted November 26, 2013 Share Posted November 26, 2013 and check force compilation option (you have to recompile theme) Link to comment Share on other sites More sharing options...
dvir Posted March 24, 2015 Share Posted March 24, 2015 if you want to disable category images only, just hide this part of code mentioned above: {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} hi to all , if i want images for sub categories, but in the sub categories after that - i dont need any images ? for example : sub category - with images - link : http://www.allsoft.co.il/581-lenovo-dell-hp-asus sub- sub category - no images and no category name - link : http://www.allsoft.co.il/5[spam-filter]dell-desktop-computers can i do that ? is it possible ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now