The information in this book is based on Version 2.10 of the TemplateToolkit, released in July 2003. The Template Toolkit will continue toevolve. Apart from bug fixes and minor updates, the Version 2.*branch will remain pretty much the same as it is now.
Version 3, expected sometime in 2004, will include new features andsome changes to the internal architecture. However, it is animportant requirement that new versions of the Template Toolkit arebackward-compatible with previous versions wherever possible.Although the Template Toolkit may change in some subtle ways, thebasic principles, syntax, and style are here to stay.
About this Book
This book is divided into 12 chapters and 1 appendix.
, Getting Started with the Template Toolkit , provides an introduction to theconcepts of template processing in general and to the TemplateToolkit in particular. It also covers how to install the TemplateToolkit on your system and gives a brief tutorial on its use so thatyou can check that installation is successful. In case itisnt, the chapter also includes pointers to othersources of information on the Template Toolkit.
, Building a Complete Web Site Using the Template Toolkit , is a tutorial on building a web siteusing the Template Toolkit. It gives a brief overview of many of thefeatures of the Template Toolkit that are covered in more detaillater in the book.
, The Template Language , begins our detailed look at theTemplate Toolkit. In this chapter, we look at the syntax of theTemplate Toolkits presentation language.
, Template Directives , covers the syntax and use of the manytemplating directives that can be used from the Template Toolkit.
, Filters , takes a look at filters. These areextensions to the Template Toolkit that allow you to filter your datain various ways before presenting it to your users. This chapterincludes a guide to the various standard filters that are includedwith the Template Toolkit distribution.
, Plugins , looks at the Template Toolkit plugins.Plugins are another way to extend the Template Toolkit by giving yourtemplates access to powerful external modules. This chapter includesa guide to the various standard plugins that are included with theTemplate Toolkit distribution.
, Anatomy of the Template Toolkit , looks under the covers of the TemplateToolkit and examines in some detail how it all works from the inside.
, Extending the Template Toolkit , covers ways to extend the TemplateToolkit by writing your own filters and plugins.
, Accessing Databases , looks in detail at writing templatesthat access data held in various different types of databases.
, XML , looks at using the Template Toolkit togenerate XML. It also covers reading XML documents and using theircontents from within your templates.
, Advanced Static Web Page Techniques , starts to put together everythingweve covered in the previous chapters and shows howto build a static web site using the Template Toolkit.
, Dynamic Web Content and Web Applications , extends the example of the previouschapter to add dynamic content to your web site.
, describes theconfiguration options for the Template Toolkit andApache::Template
.
Conventions Used in This Book
The following typographical conventions are used throughout this book:
Constant
width
Used for Perl code, Template Toolkit directives, HTML, and codeexamples.
ItalicUsed for filenames, URLs, hostnames, first use of terms, and emphasis.
Tip
Indicates a tip, suggestion, or general note.
Warning
Indicates a warning or caution.
Comments and Questions
Please address comments and questions concerning this book to thepublisher:
OReilly & Associates, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
(800) 998-9938 (in the United States or Canada) |
(707) 829-0515 (international/local) |
(707) 829-0104 (fax) |
There is a web page for this book, which lists errata, examples, orany additional information. You can access this page at:
http://www.oreilly.com/catalog/perltt |
To comment on or ask technical questions about this book, send emailto:
For more information about books, conferences, software, ResourceCenters, and the OReilly Network, see theOReilly web site at:
Acknowledgments
This book would not be possible without the contribution and supportof many individuals, including friends, family, and the hard-workingfolks at OReilly & Associates, Inc. All threeof us wish to thank our production team and, in particular, oureditor, Nathan Torkington, for his fine word wrangling and masterfulcat herding. We would also like to thank our technical reviewersChris Devers, Mark Fowler, Andrew Langmead, Martin Portman, and SimonMatthews for their detailed and insightful comments.