Jump to content

Multiple subcategory image sizes


Recommended Posts

Hello

 

I have a couple of categories with more than 100 subcategories. For these subcategories I want to remove the pictures so it only shows the name.

Currently it looks like picture1 and I want some of the subcategory look like picture2

Is there a way to change de size of some subcategory pictures or delete some of the subcategory pictures?

post-640047-0-94856200-1399982879_thumb.jpg

post-640047-0-23739400-1399982885_thumb.jpg

Link to comment
Share on other sites

you can use if condition:

                    {if $subcategory.level_depth<2}
						<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
						{if $subcategory.id_image}
							<img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
						{else}
							<img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
						{/if}
                    {/if}

in category.tpl file

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...