Page 1 of 1

Menu editor URL not accepting php code

Posted: Tue Nov 14, 2017 3:40 pm
by kirondedshem

When I try to create a custom menu item and paste custom url like "vw_employeeview.php?showdetail=employee_pension_information,employee_identification_information,employee_attachment_information,employee_bank_information&id=<?php echo CurUserID(); ?>"

It does not execute the php section to generate the parameter value, Instead it renders it as Plain HTML.

  1. How do I pass my custom php parameter into menu editor?

Re: Menu editor URL not accepting php code

Posted: Tue Nov 14, 2017 3:48 pm
by kirondedshem

For now Ive concatenated the url parameter I want as the menu item is being added .
function MenuItem_Adding(&$Item) {
//var_dump($Item);
// Return FALSE if menu item not allowed
if($Item->Text == "My Details")
{
$Item->Url .= "&id=".CurUserID();
}
return TRUE;
}