I need to check if the active menu has children in Joomla 2.5
EDIT: I had some thinking error: I don't want to check if the active menu has children, i need to determine if the submenu is displayed. The Idea of counting children won't work, because if a child item is active it might have no children, but still the submenu is displayed.
I tried something like this:
if ($this->countModules('submenu')) $showSubmenu= true;
else $showSubmenu = false;`
but this won't work, since the module is active on all pages, even if it's empty.
Is there an elegant way to obtain a boolean if there's a submenu or not?
Havent used in 2.5, but earlier versions have "countMenuChildren". From Joomla1.6 Docs there is a starting point to see what it might be called or implemented in J2.5.