The menu function still existis you can have it documented in the link bellow: http://ez.no/products/ez_publish_open_source_enterprise_cms/documentation/reference/template_functions/gui/menu
A simple way to pass variables to the template that shows the menu is defining the variable before calling the menu function. Example: