Perl template toolkit
Among the many different approaches to ""templating"" with Perl--such as Embperl, Mason, HTML::Template, and hundreds of other lesser known systems--the Template Toolkit is widely recognized as one of the most versatile. Like other templating systems, the Template Toolkit allow...
Autor principal: | |
---|---|
Otros Autores: | , |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Beijing ; Sebastopol, California :
O'Reilly
2003.
|
Edición: | First edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009626914106719 |
Tabla de Contenidos:
- Table of Contents; Preface; Audience; About this Book; Conventions Used in This Book; Comments and Questions; Acknowledgments; Andy Wardley; Darren Chamberlain; David Cross; Getting Started with the Template Toolkit; What the Template Toolkit Does; The Templating Ecosystem; The Template Toolkit Is for More Than HTML; The Template Toolkit Lets You Choose Your Separation; Nonprogrammers Can Maintain Templates; The Template Toolkit Is Easy to Extend; Installing the Template Toolkit; Downloading; Installing; Documentation and Support; Viewing the Documentation; Overview of the Documentation
- Accessing the Mailing ListUsing the Template Toolkit; tpage; ttree; The Template Module; Template configuration options; Apache::Template Module; The Template Toolkit Language; Template Variables; Complex Variables; Lists; Hashes; Nesting list and hash definitions; Dynamic Variables; Virtual Methods; Template Directives; Variable Directives; Template Processing Directives; Loops; Conditionals; Filters, Plugins, and Macros; Integrating and Extending the Template Toolkit; Building a Complete Web Site Using the Template Toolkit; Getting Started; A Single Page; A "Hello World" HTML Template
- Processing Templates with tpageTemplate Components; Headers and Footers; The PROCESS directive; The INSERT directive; Benefits of Modularity; Defining Variables; Configuration Template; Comments; Variable values; Loading the Configuration Template; Merging directives; Generating Many Pages; Creating a Project Directory; ttree Configuration File; Running ttree for the First Time; Using a Build Script; ttree Configuration Directory; Calling ttree Through the Build Script; A Place for Everything, and Everything in Its Place; Running the Build Script; Skipping Unmodified Templates
- Adding Headers and Footers AutomaticallyDefining META Tags; More Template Components; The INCLUDE Directive; Setting Default Values; The DEFAULT directive; Expressions; The IF Directive; Wrapper and Layout Templates; The WRAPPER Directive; Using an Automatic Wrapper Template; Using Layout Templates; Layout Example; Side-effect wrappers; Separating layout concerns; Plugins and the USE directive; Menu Components; Simple Menu Template; The BLOCK directive; Component Libraries; The EXPOSE_BLOCKS option; The FOREACH Directive; Defining and Using Complex Data; Structured Configuration Templates
- Layered Configuration TemplatesChoosing Global Variables Wisely; Passing Around Data Structures; Assessment; The Template Language; Template Syntax; Text and Directives; Template parser; Parse errors; Caching templates; Flexible syntax; Template Tags; Interpolated Variables; Comments; Whitespace Chomping; Chomping flags; Chomping options; Chomping constants; Multiple Directive Tags; Side-Effect Notation; Capturing Directive Output; Template Filenames; Template Variables; What's in a Name?; Simple Data Types; Complex Data Types; Lists; Hashes; Dot Operator; Compound dot operations
- Interpolated variables names