Layout Customization

The folder /templates/ contains the files that determine the layout of your page. You can use HTML and CSS to customize the layout as you wish.

If you are using a WYSIWYG editor like Dreamweaver, Frontpage or NetObjects, please make sure that the software does not make any changes by itself.

The subfolder /examples/ contains additional HTML forms. You can use them as examples for creating your own forms.

The folder /templates/ contains an .htaccess file to protect your template files from being accessed via browser. Only the script and you (via FTP) have access to the template files.

Once you have finished working on the HTML templates it is advised to run the script (not the HTML template - the whole script) through the HTML validator of the W3 consortium. The validator helps you find improper coded HTML that may prevent the script from working.

http://validator.w3.org/

Please note: Changing the extension of the template file from .html to .php has no effect. The file will not be recognized as a PHP file and therefore no PHP code will be parsed. Actually, the extension doesn't matter. It could be .html, .txt, .tpl, php or no extension at all. If you want to include PHP code in the template, please use the include feature (chapter ).

Include Files

The script allows you to include files directly into the HTML template files. It makes no difference whether you want to include PHP, HTML or other text files. For example:

<INCLUDE FILENAME="header.php">

The script automatically replaces this line with the content of the file header.php. Please pay attention that relative paths (../ etc.) start at the main directory of the script (same level as the index.php file).

If you use absolute paths (path starts with slash), the path starts at the www root folder of your web account by default. For example:

/logs/
/images/
/layout/
/layout/header.php
/form_mail/
/form_mail/templates/
/form_mail/templates/form.tpl.html
/form_mail/index.php

Let us assume that you want to include the file header.php into the file form.tpl.html. If you use a relative path, you need to start at the same level as the file index.php is:

<INCLUDE FILENAME="../layout/header.php">

If you want to use an absolute path, you need to write your path starting at the www root folder:

<INCLUDE FILENAME="/layout/header.php">

You can find examples about including in the folder /templates/examples_includes/.