The code looks right. For some reason your $mainMenu array is empty. Check $module_result.path og $module_result.node_id to see if they are set properly.
I had exactly the same problem, using the syntax provided in the Learning eZ publish 3 book. I went looking, and found this response on a French forum (if you don't read French, take a look at the code near the bottom)
It isn't exactly the same, in that it only generates a menu from whichever node you give it, but it's very clean code, which I appreciate. Of course, you can substitute 'tree' for 'list' to get everything below the current node.
David
You must be logged in to post messages in this topic!