Christopher Short Posted December 8, 2013 Share Posted December 8, 2013 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 8, 2013 Share Posted December 8, 2013 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} Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted August 9, 2014 Author Share Posted August 9, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.