Ramio Posted October 22, 2014 Share Posted October 22, 2014 (edited) Hi...I'm trying to customize default-bootstrap and after i've totally hidden left column, i've to show subcategories image with link in place of category image.I'm editing category.tpl in themes/default-bootstrap after <!-- Category image --> How can I get subcategories information? I need subcategory id and subcategory name.Could somebody help me?thanks Edited October 22, 2014 by Ramio (see edit history) Link to comment Share on other sites More sharing options...
cristic Posted October 22, 2014 Share Posted October 22, 2014 You have this information in the same file - category.tpl. Just search for {if isset($subcategories)} and see how it is implemented. Link to comment Share on other sites More sharing options...
Ramio Posted October 22, 2014 Author Share Posted October 22, 2014 I made this lines of code but nothing {foreach from=$subscategories item=subcategory} <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}"><img src="{$base_dir}icone/{$subcategory.id_category}.jpg" /></a> {/foreach} Link to comment Share on other sites More sharing options...
number3lucky Posted October 23, 2014 Share Posted October 23, 2014 i think you should edit file css bootrap. then you code file category Link to comment Share on other sites More sharing options...
cristic Posted October 23, 2014 Share Posted October 23, 2014 (edited) First of all subcategories are already there. Why do you need to rewrite this part of the file? And if you make any change in the tpl - make sure you empty the cache to take effect. Edited October 23, 2014 by cristic (see edit history) Link to comment Share on other sites More sharing options...
Ramio Posted October 23, 2014 Author Share Posted October 23, 2014 ok I solved my problem fixing my lines of codes like this {foreach from=$subcategories item=subcategory} <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}"> <img class="replace-2x" src="{$base_dir}icone/{$subcategory.id_category|escape:'html':'UTF-8'}.jpg" /> </a> {/foreach} I needed this solution because i'll do a multilanguage shop and an orizzontal menù with subcategories icons. Icons have got a watermark on the botton with the name of subcategory so I can't use default subcategory image. 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