nxmatar Posted December 21, 2009 Share Posted December 21, 2009 Bonjour,est ce que c'est possible de récupérer le nombre d'itération dans une boucle foreach voici la boucle {foreach from=$blockCategTree.children item=child name=blockCategTree} {include file=$branche_tpl_path node=$child } {/foreach} en fait je voudrais à chaque appel de {include file=$branche_tpl_path node=$child } récupérer l' itérateur (l'indice ) que je dois utiliser après. Link to comment Share on other sites More sharing options...
nxmatar Posted December 22, 2009 Author Share Posted December 22, 2009 en fait j'ai trouvé la solution il fallait juste faire $smarty.foreach.blockCategTree.index 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