我有一个列出 4 的滑块
我想添加一个额外的行,以便显示 2x4 产品。
为了实现它,我需要列出 2 个产品公关。
我真的尝试过修复它,但我的代码和我如何计算我的产品有问题。
请看一下:`{if isset($products)} {include file="$tpl_dir./breadcrumb.tpl"} {assign var=count value=0}
{foreach from=$products item=product name=products}
{if $count == 0}
<li style="position: relative;">
{/if}
<div id="ProductCon">
<div class="prodimage"><a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /></a></div>
<h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>
</div>
{if $count == 1}
</li>
{/if}
{function name='counter2'}
{$count+1}
{/function}
{/foreach}
</ul>
</div>
<!-`