PHPTAL

PHP Template Attribute Language

Kornel Lesiński

Laurent Bédubourg

Dan Sheppard

Revision History
Revision v1.32008-01-27kl
Updated for PHPTAL 1.1.10
Revision v1.22005-12-10ds
English Corrections by Dan Sheppard
Revision v1.12005-03-29lb
Added section about PHPTAL class
Revision v1.02005-03-27lb
Converted draft to docbook

Table of Contents

Introduction
Why use PHPTAL
Installation
First example
Template Attribute Language
1. Attribute priority
2. TAL namespace
2.1. tal:define
2.2. tal:condition
2.3. tal:repeat
2.4. tal:omit-tag
2.5. tal:replace
2.6. tal:content
2.7. tal:attributes
2.8. tal:on-error
3. METAL namespace
3.1. metal:define-macro
3.2. metal:use-macro
3.3. metal:define-slot
3.4. metal:fill-slot
4. I18N namespace
4.1. i18n:translate
4.2. i18n:name
5. PHPTAL namespace
5.1. phptal:debug
5.2. phptal:cache
5.3. phptal:tales
6. *:block
7. PHPTALES
7.1. path:
7.2. Conditional statements
7.3. string:
7.4. php:
7.5. not:
7.6. exists:
7.7. default
7.8. structure
7.9. Expression chains
PHP Integration
1. Defines
2. class PHPTAL
3. interface PHPTAL_Filter
4. interface PHPTAL_Trigger
5. interface PHPTAL_TranslationService
5.1. method setLanguage(...)
5.2. method useDomain($domain)
5.3. method setVar($key,$value)
5.4. method translate($key)
6. Working with gettext
6.1. Creating the translation directory structure
6.2. Portable Object files
6.3. Translation Domain
6.4. PHP usage in PHPTAL
6.5. Variable interpolation
7. Creating custom expression modifiers
Useful links
Greetings