I was wondering if I can check if the current menu item has child elements in a page. Because I would like to hide my submenu div when the parent does not have any childeren. I tried the following but didn't succeed

Code: Select all
{if $node->haschildren == true}
<div id="submenuWrap">
{menu start_level='2' number_of_levels='1'}
<div class="clearfloat"></div>
</div>
{elseif $node->haschildren == false}
<div id="submenuWrap">
this menu is empty
</div>
{/if}