Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Such a button can be added via the OnBuildGlobalMenu event.
To do this, register a handler, for example, in init.php
After we add a new button to the function:
function addMenuItem(&$aGlobalMenu, &$aModuleMenu)
{
global $USER;
if ($USER->IsAdmin()) {
$aGlobalMenu['global_menu_custom'] = [
'menu_id' => 'custom',
'text' => 'Bitrix Studio',
'title' => 'Bitrix Studio',
'url' => 'settingss.php?lang=ru',
'sort' => 1000,
'items_id' => 'global_menu_custom',
'help_section' => 'custom',
'items' => [
[
'parent_menu' => 'global_menu_custom',
'sort' => 10,
'url' => 'your_new_page.php?lang=ru',
'text' => 'your_new_page',
'title' => 'your_new_page',
'icon' => 'fav_menu_icon',
'page_icon' => 'fav_menu_icon',
'items_id' => 'menu_custom',
],
[
'parent_menu' => 'global_menu_custom',
'sort' => 20,
'url' => 'your_new_page_2.php?lang=ru',
'text' => 'your_new_page_2',
'title' => 'your_new_page_2',
'icon' => 'fav_menu_icon_2',
'page_icon' => 'fav_menu_icon_2',
'items_id' => 'menu_custom',
],
],
];
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question