Menu settings by server event (v11)

Hello,
how could I set the menu “group title” and “URL” by server event? Is it possible?
I need it beacause I have to have different settings for different user levels

You can use MenuItem_Adding server event to set the the $item’s IsHeader and Url properties. (v2020)

thank you, I tryed this but it doesn’t work, is there something wrong?Assume that “MyItem” is set as “Group Title” in the Menu settings, so by default it’s not a link (user level 1), but with the other user levels I expect it become a link (but it doesn’t yet)if (CurrentUserLevel() <> 1 && $Item->Text == “MyItem”) {$Item->IsHeader = false;

if (CurrentUserLevel() == 2 || CurrentUserLevel() == 3) {
	$Item->Url = "page1.php";
}

if (CurrentUserLevel() == 4 || CurrentUserLevel() == 5) {
	$Item->Url = " page2.php";
}

if (CurrentUserLevel() == 6) {
	$Item->Url = "page3.php";
}

}

If v2020, the empty event is like:function MenuItem_Adding($item) {
//var_dump($item);
// Return FALSE if menu item not allowed
return TRUE;
}Make sure you use $item, not $Item. (PHP variable name is case-sensitive.)

in phpm 11 is MenuItem_Adding(&$Item).
The “return true” is there…

PHPMaker v11 is too old to be discussed in here and will not be supported anymore. It had been phased out. So please always try the latest version, as of today is v2020.