Forums / General / Array append Problem / Comment29719

Author Topic

Rinze Cats

Wednesday 09 June 2004 6:53:03 am

Comment29719

Hmm,

i was using the correct code, but it isn't working because I use a name for my section. Maybe you can help me with this code

{let my_array=array()}
{section loop=$current_node.object.related_contentobject_array}
{set my_array=$my_array|append($:item.data_map.positie.content.0)}
{/section}
{$my_array|count}
{/let}

this works, and count outputs 20. Adding the name (omitting it isn't an option right now)

{let my_array=array()}
{section name=Container loop=$current_node.object.related_contentobject_array}
{set my_array=$my_array|append($:item.data_map.positie.content.0)}
{/section}
{$my_array|count}
{/let}

This code, certainly is incorrect, but I can't get it to work (tried a godzillion syntatical variations ;-( )
greetz
rinze