Forums / Setup & design / array handling
Pascal France
Thursday 27 September 2007 2:24:23 am
Hi,
Here is my while loop:
{def $tableau=array() $i=0 $NbImages=2} {while lt($i,$NbImages)} {I want $i element of $tableau =$publicites.0.children[$i].data_map.image.content[original].url|ezroot} {/while}
I don't know how to add the values into $tableau
Pascal
Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish
Łukasz Serwatka
Thursday 27 September 2007 3:16:52 am
Use append() tpl array operator:
Something like:
{set $tableau = $tableau|append( $publicites.0.children[$i].data_map.image.content[original].url|ezroot() )
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Thursday 27 September 2007 1:02:34 pm
Thanks Łukasz.It works fine.