PHPTAL Manual

PHP Template Attribute Language


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. class PHPTAL
      1. Configuration methods
        1. setOutputMode( mode)
        2. setEncoding( encoding)
        3. Other methods
      2. execute() method
      3. echoExecute() method
      4. addPreFilter() method
    2. class PHPTAL_PreFilter
    3. PHPTAL DOM
    4. interface PHPTAL_Filter
    5. interface PHPTAL_Trigger
    6. interface PHPTAL_TranslationService
      1. method setLanguage( )
      2. method useDomain( $domain)
      3. method setVar( $key, $value)
      4. method translate( $key)
      5. method setEncoding( $encoding)
    7. Working with gettext
      1. Creating the translation directory structure
      2. Portable Object files
      3. Translation Domain
      4. Using Translator in PHP
      5. Variable interpolation
    8. Creating custom expression modifiers
  7. A. Note for system administrators
  8. B. Useful links
  9. C. Greetings