I have been looking through the documentation but I haven’t found a solution. Can I use this array for the loop in template? If not, how should the template look like?
I did run in a new problem. I’m using this as a custom side menu. I need to add appropriate css classes, so I can expand, collapse menu segments and show selected item. I see that the Navigation menu has some usefull features like $isCurrent
Would it be possible to create a menu from my array?
This is for frontend only - I don’t require CMS editing.
ArrayList provides a way to iterate in template via <% loop %> ... <% end_loop %>. Then you need to provide the tags you can render, and this is provided by any ViewableData based object. For wrapping plain dictionaries you usually use ArrayData. In short you need an ArrayList or ArrayData.
Just as an aside, in case you haven’t seen it, for SiteTree (aka Page) objects you can use the $Menu template variable to get a menu you can loop through.
Thank you for the tip. I’m not sure if this would help me. I generate “left menu” array for each member based on what I get from Soap calls… Many items are not in SiteTree.