You could upload a Gist or something and put a link to it here if you can't post it directly.
Ah, in that case, the problem might be best solved with the way the menu items are structured. Ideally, traversing the menu items should be relatively painless, as the hierarchy should be defined in the data structure. Although, frankly, I tend to hardcode my menus in HTML for as long as possible, and only generate them programmatically if things look too ugly.
Ah, in that case, the problem might be best solved with the way the menu items are structured. Ideally, traversing the menu items should be relatively painless, as the hierarchy should be defined in the data structure. Although, frankly, I tend to hardcode my menus in HTML for as long as possible, and only generate them programmatically if things look too ugly.