关于我当前正在处理的网页,我遇到了问题。我使用该网站的主题是gameguru 1.5,问题是在产品列表的最后一行,当我到达底部时,出现了2个产品,而不是3个。源文件(product-list.tpl)是以下文件:
{if isset($products)}
<!-- Products list -->
<div id="product_list" class="clear category_list product_list grid row">
<div class="inner-product-list">
{foreach from=$products item=product name=products}
<div class="ajax_block_product {if $smarty.foreach.products.first}first_item{elseif $smarty.foreach.products.last}last_item{/if} {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if} clearfix col-xs-6 col-sm-6 col-md-4">
我已经尝试了好几件事,但是我完全陷在这里。最后,我想提供一个网页产品列表,以便为您提供更多指导。http://tutiendadevideojuegos.com/127-ps4-videojuegos-ps4我将非常感谢您的帮助。
谢谢,奥雷斯蒂斯
试试这个部分
{if $smarty.foreach.products.index % 2}alternate_item{else}item{/if}
改成
{if $smarty.foreach.products.index % 3}alternate_item{else}item{/if}
UPD:要操纵每页产品的数量,请在后台Preferences -> Products
选项“每页产品”中放置12个,然后所有行中有3个产品,下拉菜单中的值正确。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句