Jump to content

[SOLVED] [Question] How to not show image in SUBCATEGORIES ?


Recommended Posts

Hi All

I've set up some sub categories what troubles me is when i click on the subcategories it is showing an empty image. May i know how to remove that out from subcategories ? The reason i want to remove it is because i dont any picture that is match for the subcategories 

 

 

Thanks 

post-43959-0-31203700-1378392923_thumb.jpg

Link to comment
Share on other sites

Hi Renjii,

 

This is how you remove pictures completely from all subcategories. A picture will not show, even if you have assigned a picture to the subcategory:

 

• Go to your theme directory (If you are using default themes, then it is the default folder inside the themes directory)

 

• Open the file category.tpl

 

• Search for {if isset($subcategories)}

 

• Below the {if isset($subcategories)}, you must remove this:

<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')}" 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>

• Save your category.tpl file and upload it to the appropriate directory on your server

 

 

That should do it!

Edited by Carlsen (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi Renjii,

 

This is how you remove pictures completely from all subcategories. A picture will not show, even if you have assigned a picture to the subcategory:

 

• Go to your theme directory (If you are using default themes, then it is the default folder inside the themes directory)

 

• Open the file category.tpl

 

• Search for {if isset($subcategories)}

 

• Below the {if isset($subcategories)}, you must remove this:

<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')}" 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>

• Save your category.tpl file and upload it to the appropriate directory on your server

 

 

That should do it!

Hi Carlsen Thanks a lot ! your code is working for me

 

 

you can also do it with css styles, with this code:

#categoryImage {display:none;}

Hi vekia which css file should i change ? 

 

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...