Did you still remember about the trick I wrote in Moving “About Us” Link from Footer to Menu in Websites that Generated by PHPMaker 9.2.0 article? Just wanted to remind you about the article, it’s talking about how to move the About Us link from Footer to the menu that located at the top or left of your web application by using PHPMaker version 9.2.0 (the latest stable version of PHPMaker 9). Why did we move it from Footer to Menu bar? Good question! Since it depends on the element id, so we must only have one ID to display the About Us dialog window.
Now in PHPMaker version 10, we will do the similar thing. But, there is a little bit difference between PHPMaker version 9 and 10. In PHPMaker 10, we will not move it, but we will add a new menu item besides the one in the Footer. In other words, we will leave the About Us link in Footer, and then add another menu in Menu bar to display the About Us modal dialog (yeah, we will use Modal Dialog that belongs to Twitter Bootstrap). This will show you that in PHPMaker version 10, we don’t have to hide the link in Footer in order to add it into the Menu bar. This is the advantage we will get if using PHPMaker 10.
So here is the secret of this feature. If you want to create an About Us menu item, then you have to put the following code in the URL column of that menu item from the Menu Editor:
javascript:void(0);|||msAboutDialogShow();return false;
As you can see, since it will display the About Us window dialog, then we need to insert the Javascript function call, and its Javascript function itself named msAboutDialogShow(). In order to parse both terms, then you have to insert the three | characters between them. This sign will tell PHPMaker to generate the menu item which contains onclick attribute inside the a href tag of it. So, from now on, you may use this pattern to call your own Javascript function via Menu bar in your generated web applications.
Please note that this ability is only available if you are using MasinoFixedWidthSite10 extension for your PHPMaker project. Otherwise, it won’t work at all, since the original PHPMaker Template has not handled this ability, yet.
To see it in action, then simply visit Demo of I Love PHPMaker 10, and hover your mouse to Help (Categories) menu, and then click on About Us sub-menu item.
To implement this new feature for your PHPMaker project, then make sure you have downloaded ALL the latest version of Masino Extensions files that I made for PHPMaker version 10 from this link.
If you are not sure which ones that I customized for the latest time, just download ALL of Masino Extensions for PHPMaker 10, as I also customized some other related extensions for this changes. Extract them, and then replace all the existing extensions with the new ones.
In addition, I also just updated the Demo of PHPMaker 10 Project File and New PHPMaker 10 Project.
Have a nice try, everyone!