In this section, we take a look at the support that is available for the Template Toolkit.Viewing the Documentation
The Template Toolkit comes with an incredible amount of documentation. The documentation is supplied in the standard Perl Plain Old Documentation (POD) format. Once you have installed the Template Toolkit, you can see any of the documentation pages using perldoc or man, just as you can with any other Perl module:
During the Template Toolkit installation procedure you are offered the chance to install HTML versions of the documentation. The default location for the installation of these files is /usr/local/tt2 under Unix and C:/Program Files/Template Toolkit 2 under Win32. The installation procedure prompts for alternate locations.
If you are running a web server on your local machine, you can configure it to know where these files are. For example, you might put the contents of Example 1-4 in the httpd.conf for an Apache web server.
Example 1-4. Apache configuration directives to view Template Toolkit documentation
You can now access the locally installed documentation by pointing your browser at http://localhost/tt2/docs. For more information on configuring your web server, see the INSTALL file that comes with the Template Toolkit.
The complete documentation set is also available online at the Template Toolkit web site. You can find it at http://www.template-toolkit.org/docs.html.Overview of the Documentation
A large number of manual pages come with the Template Toolkit. Here is a list of some of the most useful ones:
The manual page for the Template module, the main module for using the Template Toolkit from Perl.
An introduction and table of contents for the rest of the manual pages.
A brief introduction to using the Template Toolkit. Not unlike this chapter.
The syntax, structure, and semantics of the Template Toolkit directives and general presentation language. Chapter 3 covers this aspect.
A description of the various ways that Perl data can be bound to variables for accessing from templates. Chapter 3 also has the details.
A reference guide to all Template Toolkit directives, with examples of usage. See Chapter 4.
A guide to the virtual methods available to manipulate Template Toolkit variables. These are also covered in Chapter 3.
A guide to the various standard filters that are supplied with the Template Toolkit. See Chapter 5.
A guide to the various standard plugins that are supplied with the Template Toolkit. See Chapter 6.
An overview of the internal architecture of Template Toolkit. See Chapter 7.
Details of the configuration options that can be used to customize the behavior and extend the features of the Template Toolkit. This is covered in the Appendix.
A description of dynamic views—a powerful but experimental feature in the Template Toolkit. The use of views is covered briefly in Chapter 9.
An introduction and table of contents to the tutorials that are distributed with Template Toolkit. Currently there are two. Template::Tutorial::Web is a quick start to using the Template Toolkit to create web pages, and Template::Tutorial:: Datafile is a guide to creating datafiles in various formats (particularly XML). See Chapter 2 and Chapter 10 for more information about using the Template Toolkit to generate web pages and XML, respectively.
Template::Library::HTML and Template::Library::Splash
Two guides to using libraries of user interface components (widgets) for creating HTML with the Template Toolkit.
A list of the various Perl modules that make up the Template Toolkit. Each module has its own manual page.Accessing the Mailing List
If you can’t find the answer to your questions in any of the documentation, you can always turn to the mailing list set up for discussion of the Template Toolkit. You can subscribe to the mailing list at: http://template-toolkit.org/mailman/listinfo/templates. All previous posts are archived at: http://templatetoolkit.org/pipermail/templates.
Activity on the list is moderate (around 100 messages per month) and many of the Template Toolkit experts are on the list.
blog comments powered by Disqus