menu trail and has children

Displays only if in a menu trail and has children.

This code has been taken from links from menu which has been tested on Drupal 5.5

<?php
$context_menu
= FALSE;

// Retrieves the current menu item
$menu_ctx=menu_get_item(menu_get_active_nontask_item());

// Does the current menu have children
if (count($menu_ctx['children'])-4 > 0) // has 4 items not in the menu
{
 
$context_menu = TRUE;
}

return
$context_menu;
?>

PS: count($menu_ctx['children'])-4 > 0 may need to be fixed, message me (not reply) to make me hurry

 
 

Drupal is a registered trademark of Dries Buytaert.