#macro( displayCssMenu $menu )
#if ($displayer.isAllowed($menu))
## set menu title
#set ($title = $displayer.getMessage($menu.title))
#if (!$menu.url) #set ($url="javascript:void(0)") #else #set ($url=$menu.url) #end
## create a single menu item
#if ($menu.components.size() == 0)
#if ($velocityCount == $menu.parent.components.size())
#else
#end
#if ($menu.name == $currentMenu)
${title}
#else
${title}
#end
#else ## create multiple menu items in a menu
#if ($menu.components.size() > 0)
#set ($hasViewableChildren = false)
#foreach ($menuIt in $menu.components)
#if ($displayer.isAllowed($menuIt))
#set($hasViewableChildren = true)
#end
#end
#end
#end
#else
#if ($velocityCount == $menu.parent.components.size())
#end
#end
#end
#end
#displayCssMenu($menu)