Custom InfoWindows
The JJWDesign Google Maps package comes with several premade templates for the Informational Windows (InfoWindows). These InfoWindows popup when a marker is clicked. Depending on the type of Module record being clicked on, the InfoWindow will display information for that record. The templates are SugarCRM Smarty Templates that can be overridden using a custom directory approach.
Info Window Templates Directory: modules/jjwg_Maps/tpls/
- AccountsInfoWindow.tpl
- CasesInfoWindow.tpl
- ContactsInfoWindow.tpl
- InfoWindow.tpl
- LeadsInfoWindow.tpl
- MeetingsInfoWindow.tpl
- OpportunitiesInfoWindow.tpl
- ProjectInfoWindow.tpl
- ProspectsInfoWindow.tpl
- UsersInfoWindow.tpl
Custom Info Window Templates Directory: custom/modules/jjwg_Maps/tpls/
Just copy an original template file from the modules/jjwg_Maps/tpls/ directory and place it into custom/modules/jjwg_Maps/tpls/ directory. Then modify your custom template file. You’ll now have an upgrade safe template to use for your module.
Custom Modules Templates:
Custom modules can also have their own template files. For example, if you have a custom module named “joe_Invoices”, then create a new template file called “joe_InvoicesInfoWindow.tpl”
Filename Format: {Module Name}InfoWindow.tpl
Limited Module Data
Note, limited module field data is available for the InfoWindow creation. This may change in the future as I improve the package to include more REST API calls. For now, the $fields are limited. The $mod_strings are available for labels. See the existing template files for examples.