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.

Returned value

Returned value is not used.

See Also

Examples of use

AddEventHandler("main", "OnAdminContextMenuShow", "MyOnAdminContextMenuShow");
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-2022