PreviewRow extension (only for the registered PHPMaker users) is one of the best extensions that provided by PHPMaker. It will turn your List pages which have some detail pages in it into several tabs. The tabs are hidden by default, and replaced by only plus (+) icon. When you click on the icon, then the detail pages that represented by tabs will be shown. This is very good if you have more than one detail pages. In addition it will save the space in your web application, it also makes the look and view of your web application becomes more professional.
Unfortunately, up to PHPMaker 9.2.0, it has not the ability to hide the certain tabs you want. For example, I want to hide the certain tab by using the certain Server Events for the certain user levels which do not have permission to access the detail pages. I think this ability should be provided by PHPMaker by default, especially if the current user is forbidden to display the certain detail pages. The existing condition, the tab that belong to such restricted detail pages are still being shown, and below it will be shown “You do not have permission to access the page” message. I think this is not a good condition, and also so funny. It often makes your users get confused. They must be asking by themselves: “If this detail cannot be accessed, why then the tab was being displayed?”. Indeed! LoL.
Well, I have successfully customized the extension to overcome this issue. After implementing the customization below, then all of the preview row tabs that belong to the restricted/forbidden details pages will be hidden automatically. You don’t need to use any Server Events anymore for this! You don’t need also to customize the generated script files at all as I always avoid it all the time! All we have to do is by customizing the template, so you can use it for your future PHPMaker projects.