Nie mogę sobie poradzić ze zmianą liczby kolumn na liście produktów dla mobilnego widoku. Aktualnie na telefonie wyświetla mi się jedna kolumna, a chciałbym to zmienić na dwie.
Oto co zmieniłem, ale i tak nie pomogło.
product-list.tpl
{*define number of products per line in other page for desktop*}
{if $page_name !='index' && $page_name !='product'}
{assign var='nbItemsPerLine' value=4}
{assign var='nbItemsPerLineTablet' value=3}
{assign var='nbItemsPerLineMobile' value=2}
{else}
{assign var='nbItemsPerLine' value=4}
{assign var='nbItemsPerLineTablet' value=3}
{assign var='nbItemsPerLineMobile' value=2}
{/if}
{*define numbers of product per line in other page for tablet*}
Question
cel3ct
Presta 1.6
Nie mogę sobie poradzić ze zmianą liczby kolumn na liście produktów dla mobilnego widoku. Aktualnie na telefonie wyświetla mi się jedna kolumna, a chciałbym to zmienić na dwie.
Oto co zmieniłem, ale i tak nie pomogło.
product-list.tpl
{*define number of products per line in other page for desktop*} {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {else} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {/if} {*define numbers of product per line in other page for tablet*}
<li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-6 col-sm-3 col-md-3{else} col-xs-6 col-sm-3 col-md-3{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0}
Link to comment
Share on other sites
2 answers to this question
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