bad ****** f***** Posted April 26, 2012 Share Posted April 26, 2012 J'ai un foreach je ne connais pas le code pour limité le nombre de boucle car je ne désire pas afficher toutes les promos mais seulement 4. je ne connais pas trés bien smarty, voici mon code. j'ai implifié {foreach from=$products item=product name=mespromos} {if $smarty.foreach.mespromosProducts.index < $num} {$product.name|truncate:25:'...'|escape:'htmlall':'UTF-8'} {/if} {/foreach} merci Link to comment Share on other sites More sharing options...
bad ****** f***** Posted April 26, 2012 Author Share Posted April 26, 2012 {if $smarty.foreach.mespromosProducts.index < $num} en remplacent $num par mon nombres de loop (produits) 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