Jump to content

[SOLVED] Category & subcategory images


Recommended Posts

So, I'm wanting to try something that may or may not be doable. I want to display subcategories' images, but I so not want to display the subcategory's image when you finally get to the last subcategory.

For example, in a hierarchy of Home>Clothes, I like that I can see >Shirts, >Pants, >Hats, etc. for navigation purposes, but when I actually pull up >Shirts, I don't want to see the Shirts category image.

So my question is, how would one go about this? I'm in 1.6.0.6.

Link to comment
Share on other sites

Or, to ask another way, is it possible to customize the theme to modify how the Category page layout? Eg. Eliminate the "display category image" line, adjust the "background" (gray box) and "description text" color, etc. I simply have no clue where said code might exist to be able to tweak it. I will do some research on theme customization later today, maybe I can answer my own Q.  :)

Link to comment
Share on other sites

thank you for posting your version of code.

i marked this thread as solved.

with regards,

Milos

 

Hi,

I like to delete subcategory images and links below the images and believe that you have the solution. I myself do not know just where I should enter the code you have written in previous comments. Have any of you the opportunity to make a more detailed description?

Link to comment
Share on other sites

Hi,

I like to delete subcategory images and links below the images and believe that you have the solution. I myself do not know just where I should enter the code you have written in previous comments. Have any of you the opportunity to make a more detailed description?

 

 

you just mean that you want to remove whole subcategies block, right?

Link to comment
Share on other sites

from file:

/themes/default_bootstrap/category.tpl remove this code:
 

		{if isset($subcategories)}
		<!-- Subcategories -->
		<div id="subcategories">
			<p class="subcategory-heading">{l s='Subcategories'}</p>
			<ul class="clearfix">
			{foreach from=$subcategories item=subcategory}
				<li>
                	<div class="subcategory-image">
						<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}
					</a>
                   	</div>
					<h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'|truncate:350}</a></h5>
					{if $subcategory.description}
						<div class="cat_desc">{$subcategory.description}</div>
					{/if}
				</li>
			{/foreach}
			</ul>
		</div>
		{/if}

that's all

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