Forums / Install & configuration / Nested loops / Comment809
Tony Wood
Thursday 23 January 2003 5:05:58 am
I tried to use nested loops, but i found the loops worked but the values were not being returned correctly, so gave up till full version comes out... It may be a bug..
> Are nested loops possible? If so, could you help me find > reason why the following code is not working: > > {section name=Folder loop=$folder_list} > <a > href={concat("content/view/full/",$Folder:item.node_id,"/")|ezurl}>{$Folder:item.name}</a> > <UL> > {section name=sub loop=$subfolder_list} > <LI><a href=#>{$sub:item.name}</a> > {/section} > </ul> > {/section} > > Here $folder_list and $subfolder_list are valid arrays > built by fetch; I can print them out separately without > problems but when I nest it one into another they fail. > Interesting, $subfolder_list still has correct number of > elements, I can see it by bullets printed by <UL>. But real > data (name) is lost. > > I need a solutin because I want to build left-hand menu on > site where top level menu entries are dynamically built from > folders on root level (variable: $folder_list) and > second-level menu is built from folders located inside root> level folders.
Tony Wood : twitter.com/tonywood Vision with Technology Experts in eZ Publish consulting & development Power to the Editor! Free eZ Training : http://www.VisionWT.com/training eZ Future Podcast : http://www.VisionWT.com/eZ-Future