Jump to content

Pictures for sub categories


Recommended Posts

Is there a way to remove sub category images? www.csrocketry.com is my site. If you select rocket motors for instance, i want to keep the images on thatg page, but then if you select aerotech, I would like to remove those images and down throught the next pages. I would like tis for my entire site.

 

 

Link to comment
Share on other sites

What you are wanting is to suppress the category thumbnails if the category is not a top-level category (TLC). Am I right?

 

Each sub-category block has both a thumbnail image and a text link. So, in your skin template content.category.php, find:

{if isset($SUBCATS) && $SUBCATS}
<div id="subcategories">
  {foreach from=$SUBCATS item=subcat}
  <div class="subcategory">
    <a href="{$subcat.url}" title="{$subcat.cat_name}">
      <img src="{$subcat.cat_image}" alt="{$subcat.cat_name}" />
    </a>
    <a href="{$subcat.url}" title="{$subcat.cat_name}">{$subcat.cat_name}</a>
  </div>
  {/foreach}
</div>
{/if}

If you want to suppress the entire sub-category area, then do this:

{if isset($SUBCATS) && $SUBCATS && $category.cat_parent_id == 0}

TLCs have a cat_parent_id of 0, so only TLCs will show their sub-cats.

 

If you want to suppress just the image, but keep the text link, then do this:

{if $category.cat_parent_id == 0}<a href="{$subcat.url}" title="{$subcat.cat_name}">
  <img src="{$subcat.cat_image}" alt="{$subcat.cat_name}" />
</a>{/if}
Link to comment
Share on other sites

  • 8 months later...

 

What you are wanting is to suppress the category thumbnails if the category is not a top-level category (TLC). Am I right?

 

Each sub-category block has both a thumbnail image and a text link. So, in your skin template content.category.php, find:

{if isset($SUBCATS) && $SUBCATS}
<div id="subcategories">
  {foreach from=$SUBCATS item=subcat}
  <div class="subcategory">
    <a href="{$subcat.url}" title="{$subcat.cat_name}">
      <img src="{$subcat.cat_image}" alt="{$subcat.cat_name}" />
    </a>
    <a href="{$subcat.url}" title="{$subcat.cat_name}">{$subcat.cat_name}</a>
  </div>
  {/foreach}
</div>
{/if}

If you want to suppress the entire sub-category area, then do this:

{if isset($SUBCATS) && $SUBCATS && $category.cat_parent_id == 0}

TLCs have a cat_parent_id of 0, so only TLCs will show their sub-cats.

 

If you want to suppress just the image, but keep the text link, then do this:

{if $category.cat_parent_id == 0}<a href="{$subcat.url}" title="{$subcat.cat_name}">
  <img src="{$subcat.cat_image}" alt="{$subcat.cat_name}" />
</a>{/if}

I dont follow what to do. WHat i'm after is a way to keep the top category image as it will be the brands logo,but remove the image from sub categories. I want to only have the text link in there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...