Documentation

OnAdminContextMenuShow

void
Handler(
 array &items
);

The event OnAdminContextMenuShow is fired in the function CAdminContextMenu::Show() when buttons are added to the index page. The event allows to modify or add custom buttons to the index page toolbar.

Function parameters

Parameter Description
items Link to the array of toolbar buttons. Array structure is described on the page CAdminContextMenu constructor.

Return

Returned value is not used.

See Also

Example

<?
AddEventHandler("main", "OnAdminContextMenuShow", "MyOnAdminContextMenuShow");
public static function MyOnAdminContextMenuShow(&$items)
{
//add custom button to the index page toolbar
if($GLOBALS["APPLICATION"]->GetCurPage(true) == "/bitrix/admin/index.php")
$items[] = array("TEXT"=>"module settings", "ICON"=>"", "TITLE"=>"module settings page", "LINK"=>"settings.php?lang=".LANGUAGE_ID);
}
?>


© «Bitrix24», 2001-2024
Up