Features » Design and development

Adding functionality

If you need to add custom functionality, you can write PHP scripts, which can be included at 3 points:

  • Before the HTML templates are loaded
    Good for initialising variables or if a condition might require a redirect.
  • After the HTML templates are loaded, before content is inserted
    Good for most scripts.
  • After content is inserted
    Good for scripts which require additional content-related data, which is available at this point.

Before your scripts are included, there is only one global variable ($cms), so your scripting environment is a 'clean slate'. You don't have to worry about over-writing important variables, or rename your own functions because of clashes. $cms contain useful page-related data and functions which you can use in your scripts.


Next page: Site files, access and security »