How do I hide a menu item when the report is empty ? (v2023)
Hide empty menu item
-
- User
- Posts: 72
I changed the code but this also didn't work.
function MenuItem_Adding($item)
{
if ($item->Url == "deelnemersconferentiedag" && ExecuteScalar("SELECT COUNT(*) FROM html1
=77") { // <-- menu items to hide
$item->text = "Deelnemers Conferentiedag";
return FALSE;
} return true;
}
-
- User
- Posts: 72
I changed the code and now it is working:
function MenuItem_Adding($item)
{
if ($item->Url == "deelnemersconferentiedag" && (ExecuteScalar("SELECT COUNT(*) FROM html1")==77)) { // <-- menu items to hide
$item->text = "Deelnemers conferentiedag";
return FALSE;
}
return TRUE;
}