nzecheru Posted July 9, 2013 Share Posted July 9, 2013 Hello, I would like to remove the subcategories from the homepage. When you click on a category it will show the category picture (which is OK) and below this picture it shows the subcategories. I want to remove the subcategories (but still show them in the left column), how can I do that? http://s764.photobuc...9-22PM.png.html I am using the default theme in version 1.5.4.1 Thank you, Nicu. Link to comment Share on other sites More sharing options...
amr.rs Posted July 9, 2013 Share Posted July 9, 2013 You can just make that div hidden. Link to comment Share on other sites More sharing options...
vekia Posted July 9, 2013 Share Posted July 9, 2013 but he want main categories probably (not whole div with categories) Link to comment Share on other sites More sharing options...
nzecheru Posted July 9, 2013 Author Share Posted July 9, 2013 (edited) Correct. I Just need the main category to be displayed and just remove the listing with all subcategories. In which file do I find this: <div id="subcategories"> Maybe if i comment this part it will not be displayed, right? Edited July 9, 2013 by nzecheru (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 9, 2013 Share Posted July 9, 2013 i checked sources, well i think that you can hide it open the category.tpl file located in your theme dir then comment code: {* {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} }* 2 Link to comment Share on other sites More sharing options...
nzecheru Posted July 9, 2013 Author Share Posted July 9, 2013 i checked sources, well i think that you can hide it open the category.tpl file located in your theme dir then comment code: {* {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} }* Thank you very much vekia! If I comment the entire section it hides the content - right column shifts next to the left column... What I did was to comment everything from <h3>{l s='Subcategories'}</h3> to {/foreach} </ul> {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 More sharing options...
tdr170 Posted July 10, 2013 Share Posted July 10, 2013 (edited) You need to comment out the entire code from opening {if isset($subcategories)} to closing {/if}. basically all the code vekia posted, If your sure you can also just delete the code from the file. {* {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} *} Edited July 10, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
amr.rs Posted July 10, 2013 Share Posted July 10, 2013 If you don't want to remove it or comment it you can try something like this. <div id="subcategories" style="display: none;"> 1 Link to comment Share on other sites More sharing options...
vekia Posted July 10, 2013 Share Posted July 10, 2013 i think that method suggested by amr.rs will be fine for SEO purposes 2 Link to comment Share on other sites More sharing options...
nzecheru Posted July 10, 2013 Author Share Posted July 10, 2013 Thank you all for your help, it works great! Can someone mark this topic as solved? Link to comment Share on other sites More sharing options...
vekia Posted July 10, 2013 Share Posted July 10, 2013 done. thread marked as [solved] anyway, you can also mark own threads as [solved]- here is an instruction: [sOLVED] TopicIf, after posting a topic, you find a solution to your problem, please indicate it in your post and describe the solution. Furthermore if you are the author of the topic for which a solution has been found, please edit your topic title to mark it as [sOLVED]. To mark a topic as [solved] : - Edit the first post of your topic by clicking on the "Edit" button, - Click on the "Use full editor" button, - Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now