ibrahimovich87 Posted July 20, 2018 Share Posted July 20, 2018 (edited) Hi need an help for showing category Pics in my homepage, i've inserted this in category.tpl, but i have a little problem, this show me the image.group but if i insert a little pics, when i'm clicking on group the show me little pics like the second image...so...how can show category miniature image and not category.image?? I would also need the images of the categories to be shown in a circle and centered Thanks all Category.tpl " {block name='product_list_header'} <div class="block-category card card-block hidden-sm-down"> <h1 class="h1">{$category.name}</h1> {if $category.description} <div class="category-cover"> <img src="{$category.image.large.url}" alt="{$category.image.legend}"> </div> {/if} </div> <div class="text-xs-center hidden-md-up"> <h1 class="h1">{$category.name}</h1> </div> {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <p class="subcategory-heading"></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, 'category_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/> {else} <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-category_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/> {/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'}</a></h5> </li> {/foreach} </ul> </div> {/if} {/block}" Theme.css #subcategories { border-top: 1px solid #d6d4d4; padding: 15px 0 0px 0; } #subcategories p.subcategory-heading { font-weight: bold; color: #333; margin: 0 0 15px 0; } #subcategories ul { margin: 0 0 0 -20px; } #subcategories ul li { float: left; width: 145px; margin: 0 0 13px 33px; text-align: center; height: 202px; } #subcategories ul li .subcategory-image { padding: 0 0 8px 0; } #subcategories ul li .subcategory-image a { display: block; border-radius : 1px; border: 2px inset #156192; } #subcategories ul li .subcategory-image a img { max-width: 100%; vertical-align: top; } #subcategories ul li .subcategory-name { font: 600 18px/22px "Open Sans", sans-serif; color: #555454; text-transform: capitalize; } #subcategories ul li .subcategory-name:hover { color: #515151; } #subcategories ul li .cat_desc { display: none; } #subcategories ul li:hover .subcategory-image a { border: 5px solid #333; padding: 5px; } Edited July 20, 2018 by ibrahimovich87 Edit (see edit history) 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