Jump to content

Remove images in subcategories


Guest

Recommended Posts

Thare are a couple of ways this can be accomplished first you can remove the subcategories section from the category.tpl file, You could also just add style="display:none" as below.

 

With this method you will not see the Sub Category images but they still load they are just not displayed.

 

Edit category.tpl in themes/yourtheme/

 

Change This

 

<!-- Subcategories -->

<div id="subcategories">

<h3>{l s='Subcategories'}</h3>

<ul class="inline_list">

{foreach from=$subcategories item=subcategory}

 

To This

 

<!-- Subcategories -->

<div id="subcategories" style="display:none">

<h3>{l s='Subcategories'}</h3>

<ul class="inline_list">

{foreach from=$subcategories item=subcategory}

 

 

Or delete this from the category.tpl file for complete removal.

 

 

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

Link to comment
Share on other sites

×
×
  • Create New...