1 menu.inc theme_menu_tree($variables)

Returns HTML for a wrapper for a menu tree.

Note that this may be called multiple times for rendering a menu and its children if showing multiple levels of depth.


$variables: An associative array containing:

  • attributes: Since 1.5.0. Attributes to be added to this menu tree.
  • depth: Since 1.5.0. The menu level depth. Will be 0 for the first level.
  • tree: An HTML string containing the tree's items.

See also


Related topics


core/includes/menu.inc, line 1797
API for the Backdrop menu system.


function theme_menu_tree($variables) {
  return '<ul' . backdrop_attributes($variables['attributes']) . '>' . $variables['tree'] . '</ul>';