HTML/Tcl Templates

A Tcl template works by mixing Tcl code into normal HTML pages. The server uses the Tcl subst command to replace the Tcl code and variable references with their results and values. For example, the version of the Tcl server is:

2.1.1 12/24/1997

This is obtained with [Httpd_Version] in the page.

The time this page was generated is:

Wed Dec 24 14:03:17 PST 1997

The "location" of this page is home.

Templates with Form Data

If you want to process query data, it is available in the page(querylist) variable. This is already decoded into a list of names and values. Take a look inside form.tml, for example.