Skip to content
Tim Curzon edited this page Feb 28, 2022 · 5 revisions

Content

Overview

Tales are expression modifiers - they take a value and return something else - and they are the closest thing TAL has to functions. PHPTAL comes with only the standard Zope Tales which are very limited in scope (a fact that surprises many new users of PHPTAL) and so ZTal comes packed with an essential collection of useful Tales ready for you to use. In fact many of the ZTal tales may be used directly within any PHPTAL project and do not rely on other parts of ZTal.

The ZTal tales are broken down into:

  • Generic - A useful collection of general Tales
  • Array - Array-manipulation Tales
  • Date - Date range comparisons
  • Form - Tales specifically for Zend_Form support
  • Translation - Tales to support translation

Of these, the ones you are likely to use most heavily are the generic tales. If you need plural support in translations or are planning to write your own replacement macros for Forms then the others may be of some use to you.

Please note that some tales in the documentation may not be available in earlier releases of ZTal and may only be available on develop or master until the next release.

Clone this wiki locally