PHPTAL Manual

PHP Template Attribute Language

Laurent Bédubourg

Kornel Lesiński

Dan Sheppard

Anton Valeriyevich Andriyevskyy

Revision History

Table of Contents

  1. Introduction
  2. Why use PHPTAL
  3. Installation
  4. First example
  5. Template Attribute Language
    1. Referencing variables with ${}
    2. Attribute priority
    3. TAL namespace
      1. tal:define
      2. tal:condition
      3. tal:repeat
      4. tal:omit-tag
      5. tal:replace
      6. tal:content
      7. tal:attributes
        1. Optional attributes
      8. tal:on-error
    4. METAL namespace
      1. metal:define-macro
      2. metal:use-macro
      3. metal:define-slot
      4. metal:fill-slot
    5. I18N namespace
      1. i18n:translate
      2. i18n:attributes
      3. i18n:name
      4. XHTML in translations
    6. PHPTAL namespace
      1. phptal:debug
      2. phptal:cache
        1. Instant refreshing
        2. Limitations:
      3. phptal:tales
    7. tal:block
    8. PHPTALES
      1. path:
      2. Alternative PHP operator syntax
      3. string:
      4. php:
      5. not:
      6. exists:
      7. true:
      8. default
      9. structure
      10. Expression chains
  6. PHP Integration
    1. Constants
    2. class PHPTAL
      1. Configuration methods
        1. setOutputMode(mode)
        2. setEncoding(encoding)
        3. Other methods
      2. execute() method
      3. echoExecute() method
      4. addPreFilter() method
    3. class PHPTAL_PreFilter
    4. PHPTAL DOM
    5. interface PHPTAL_Filter
    6. interface PHPTAL_Trigger
    7. interface PHPTAL_TranslationService
      1. method setLanguage()
      2. method useDomain($domain)
      3. method setVar($key,$value)
      4. method translate($key)
      5. method setEncoding($encoding)
    8. Working with gettext
      1. Creating the translation directory structure
      2. Portable Object files
      3. Translation Domain
      4. Using Translator in PHP
      5. Variable interpolation
    9. Creating custom expression modifiers
  7. A. Note for system administrators
  8. B. Useful links
  9. C. Greetings