PostgreSQL PHP Generator online Help
Prev | Return to chapter overview | Next |
Custom templates
Applications created by PostgreSQL PHP Generator use Smarty, a typical representative of the web template engines family. So in order to redesign a webpage, you need to change the appropriate template. All templates used by the software are stored in the components/templates subfolder of the output directory. Each folder in this catalog contains template files to be used by the application in different cases: on editing, printing, inserting, etc.
Using custom templates
To change the webpage appearance with custom templates, follow these steps:
• | Create a new template. Custom templates must be stored under the components/templates/custom_templates folder which contents is not changing on re-generation of the scripts. You must create this folder manually. |
• | Instruct PHP Generator to use this template for the selected webpage with the OnGetCustomTemplate event. |
• | Customize the template according to your needs and preferences. |
The detailed description of such customization is given in the appropriate article. Another article learns how to add a chart component to a webpage using the way described above. The demo application also shows some additional examples of using custom templates.
Changing existing templates
You can modify generated template files directly. The example of supplying of generated pages with look and feel of an existing website illustrates this method in the appropriate article. Since all the templates are rewritten each time you generate an application, you have to add modified templates to the Excluded files list to prevent them from overwriting.
Prev | Return to chapter overview | Next |