Custom component registers, no menu
Posted: Fri Jan 30, 2026 3:27 pm
Following this guide: https://support.nagios.com/kb/article/n ... s-291.html
The component registers, is listed in "Manage Components". I cannot get it to show up in any menu I have tried to attach it to.
Pertinent code:
The component registers, is listed in "Manage Components". I cannot get it to show up in any menu I have tried to attach it to.
Pertinent code:
Help me, Obi won kenobi, you're my only hope.function customnotifications_component_addmenu($arg = null)
{
if (is_readonly_user(0)) {
return;
}
global $customnotifications_component_name;
$urlbase = get_component_url_base($customnotifications_component_name);
$mi = find_menu_item ( MENU_ACCOUNT, "menu-account-customtemplates", "id" );
if ($mi == null) {
return;
}
$order = grab_array_var($mi, "order", "");
if ($order == "") {
return;
}
$neworder = $order + 1.1;
add_menu_item(MENU_ACCOUNT, array(
"type" => "link",
"title" => _("Custom Notification Templates"),
"id" => "menu-account-customtemplates",
"order" => $neworder,
"opts" => array(
"href" => $urlbase . "/index.php"
),
"function" => "customnotifications_can_show_menu"
));
}