Forums / Developer / Create multidim Array in template out of a fetch list

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Create multidim Array in template out of a fetch list

Author Message

Björn X

Monday 23 June 2003 9:23:08 pm

My problem is I need a multi dim array that get created some time in the beginning of the template and gets read out again invarious place.

I use a fetch to get the data(text overlays) for the images.

My goal is to create a js tree menu with images.....

Here is some of my code I tried to create this. I hope you get the idea.

{let
imagedir="http://www:92/"
menu=fetch(content,list,hash(parent_node_id,43,class_filter_array,arra(1)))
multi_dim_image_array=array()
}
{section name=Child loop=$menu}
{set
images.$Child:index.img_normal=image(imagefile('design/xrow/images/menu1.jpg'),$Child:item.name|texttoimage('xrow')

images.$Child:index.img_down=image(imagefile('design/xrow/images/menu1_f2.jpg'),$Child:item.name|texttoimage('xrow' )

images.$Child:index.img_over=image(imagefile('design/xrow/images/menu1_f3.jpg'),$Child:item.name|texttoimage('xrow')

}
{/section}
....from now on the the crappy array should be filled with images and strings... Well I don't know how :-) .. Help me .. Please

...now I do some section to read it out again
{section name=Img loop=$images}
{$Img:item.img_over.imagepath}
{/section}

{/let}