You can check out emenu in action here.
If you have many options that are dependant on user role or licence you may want to try out what emenu has to offer. Main idea is to pull out menu definition in ruby based configuration.
I’ve opted out for internal DSL so it’s pure ruby, and you can add conditions as needed.
I had a pretty complex html to generate, and I suspect you basically need it that way for anything that needs to look remotely normal. That’s why I’ve ran away from templates to code-based generation. It is straightforward to change code to support your specific styling needs.