How to Open A Page in New Tab from Menu Item (v2021)

Tips submitted by PHPMaker users
Post Reply
mobhar
User
Posts: 11660

How to Open A Page in New Tab from Menu Item (v2021)

Post by mobhar »

For example, you want to open News page which has URL as news from demo project of PHPMaker 2021, then you may simply insert the following code in MenuItem_Adding server event before the return true; line:

if ($item->Url == "news") {
    $item->Target = "_blank";
}

Post Reply