Get KoolPHP UI with 30% OFF!

How to change Target from one menu item to another

Michael
I want some menu options to open in the same tab and other menu items to open in a new tab. I found the Target command but it seems to affect ALL menu items. I want to control the target for each menu option.
Posted Mar 28, 2018 Kool
David
Hi Mike,
I think there is a Target property for each menu item, too:
https://doc.koolphp.net/Controls/KoolMenu/PHP/KoolMenuItem_Class/index.php#Target
It should override the general menu's Target. Please try it and let us know if it solves your problem.
Thanks!
Posted Mar 29, 2018 Kool
Michael
The code example was a bit confusing because you can't use that code exactly. After I changed it to match my item it worked.
An example showing all 3 lines would have helped me figure it out faster.
$km->Add("root","latlon","LAT/LON Lookup","http://www.qrz.com/atlas");
$item_latlon = $km->GetItem("latlon");
$item_latlon->Target="_blank"; // Open new window when click.
$km->Add("root","dxnews","DX News","https://plus.google.com/communities/106942764330406560133");
$item_dxnews = $km->GetItem("dxnews");
$item_dxnews->Target="_blank"; // Open new window when click.
Posted Mar 29, 2018 , edited Mar 29, 2018 Kool