array( 'title' => t('Home'), 'href' => '', 'html' => FALSE, 'attributes' => array( 'title' => t('Home page'), ), ), 'weight' => -10, ); /** * A tab may be associated with a tray. * * The tray should contain a renderable array. An option #heading property * can be passed. The text is written to a heading tag in the tray as a * landmark for accessibility. A default heading will be created if one is not * passed. */ $items['commerce'] = array( 'tab' => array( 'title' => t('Shopping cart'), 'href' => '', 'html' => FALSE, 'attributes' => array( 'title' => t('Shopping cart'), ), ), 'tray' => array( '#heading' => t('Shopping cart actions'), 'content' => array( '#theme' => 'item_list', '#items' => array( /* An item list renderable array */ ), ), ), 'weight' => 50, ); return $items; } /** * Alter the Toolbar menu after hook_toolbar() is invoked. * * This hook is invoked by toolbar_view() immediately after hook_toolbar(). The * toolbar definitions are passed in by reference. Each element of the $items * array is one item returned by a module from hook_toolbar(). Additional items * may be added, or existing items altered. * * @param $items * Associative array of Toolbar menu definitions returned from hook_toolbar(). */ function hook_toolbar_alter(&$items) { // Move the User tab to the right. $items['commerce']['weight'] = 5; } /** * @} End of "addtogroup hooks". */