ZISP Demon Logo
 

[ Templates - Reference ]

Using Templates allows you to customise many of the Dynamic Tools

Which tools use templates?

Every dynamic tool that generates HTML output uses templates as the source of this output. This makes it very easy to change the appearance of these Dynamic Tools - you just need to edit the template!

Template files are just regular HTML files. Several of the template files have a special tag. For example, the "g_view.html" template, which is used by the GuestBook Dynamic Tool to display the content of the guestbook, has a special tag. This special tag is replaced by the contents of the guestbook whenever the template is used.

Where are template files kept?

The reference section for each Dynamic Tool lists the templates that that tool requires. Default templates are provided by your ISP; you can access them from here.

You can use your own templates in preference to the default templates. Your own templates are kept in a folder called "easyzisp" on your website. The Dynamic Tools look here first, before looking for the default templates.

How do I use my own templates?

  • First, you need to create a folder (directory) called "easyzisp" inside the "docroot" folder of your website. You can create that with your FTP client.

    Once you have created the folder, you can look in it with your internet browser at the address:

    http://www.mysite.com/easyzisp/

    (replace "www.mysite.com" with the name of your web site).

  • Next, you need to create your new templates. The best way to begin is to take one of the default templates, and use it as a basis for your own version. Because templates are just HTML files, you can edit them in FrontPage, Notepad or any text or HTML editor.

    Take a look at the reference guide for each Dynamic Tool. This has important information on what you should put in each template, and has some example templates which you can use.

  • Finally, upload your templates to your new "easyzisp" folder. Make sure that you give your templates the correct names as explained in the reference guide.

Localization

If your website is popular, you'll find that all sorts of different people will come and visit it. The Dynamic Tools Templates are powerful enough that they can provide different output for different languages!

On your web browser, you will find that you can set which languages you want to read web pages in. Take a look at your web browser configuration or preferences.

For example, a native French speaker may prefer to read pages in French if possible.

You can provide different templates in different languages. The Dynamic Tool will use the most appropriate template for each visitor - one visitor may read about your Email Form in French, and another in English!

Languages are expressed using the following standard two-letter abbreviations:

en  English   fr  French   de  German   es  Spanish  
it  Italian   pt  Portugese   nl  Dutch   da  Danish  
fi  Finnish   sv  Swedish   no  Norwegian   el  Greek  
hu  Hungarian   pl  Polish   cs  Czech   ru  Russian  
ja  Japanese   ko  Korean   zh  Chinese   id  Indonesian  
Common Language Abbreviations

Have a look at your web browser configuration for some of the less common abbreviations.

If you create a French version of your template, save it in your "easyzisp" folder and call it "<template-name>.fr.html"

If a visitor expresses a language preference, the Dynamic Tool will first try and find a template that matches their preference. If it can't find one, it will try using the default template name (i.e., "<template-name>.html").

If it can't find a matching template in your "easyzisp", it will then look at the default templates. Once again, it will first try and find a template that matches the visitor's language preference before using the default template name.

Using Localization and IDs

You can use unique IDs alongside the localization. Your template should be called

<template-name><ID>.<lang>.html

For example, the French version of the "mailer.html" template with an ID of "45" should be called:

mailer45.fr.html