[ANNOUNCEMENT] HTML_Template_Flexy-1.1.0 (stable) Released.
| From: | PEAR Announce | Date: | Sat, 18 Dec 2004 04:20:56 +0000 |
| Subject: | [ANNOUNCEMENT] HTML_Template_Flexy-1.1.0 (stable) Released. | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16299@lists.php.net to get a copy of this message | ||
The new PEAR package HTML_Template_Flexy-1.1.0 (stable) has been released at http://pear.php.net/.
Release notes
-------------
Minor Feature Release
Changes
Note: This release may include some changes which may break BC, (in which case they
_are_ bugs and will be fixed.).
Features
#------ Forms without names, now are not generated as HTML_Elements, rather than given a default
name.
#------ support for -ve numbers in {arrays[-1]}
#------ support for variable replacements in commented out blocks of styles
#2074 - allow literal numbers in methods, eg. {somemethod(3,#astring#,avar)}
Features
#------ Limited support for Xul in Elements
#2097 Support for mixing flexy vars within dynamic elements.
(If this causes problems, please file a bug report.)
#------ Forms without names render as plain HTML, rather than generating dynamic
elements.
#------ createToken code is simplified and supports writing the position of a token
(generally for usage in the Tree.php file for parsing html only.)
#------ Fixed tree builder so it is more tolerant of malformed HTML (eg. form tags
with closures in the wrong part of the html tree)
#------ Style element now works with flexy tags (rather than ignoring them within
comments)
#------ Support for translation of alt tags of IMG
Package Info
-------------
HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe,
however in Version 0.2, It became one of the first template engine to use a real Lexer,
rather than regex'es, making it possible to do things like ASP.net or Cold Fusion tags.
However, it still has a very simple set of goals.
- Very Simple API,
o easy to learn...
o prevents to much logic going in templates
- Easy to write document'able code
o By using object vars for a template rather than 'assign', you
can use phpdoc comments to list what variable you use.
- Editable in WYSIWYG editors
o you can create full featured templates, that doesnt get broken every time you edit with
Dreamweaver(tm) or Mozzila editor
o Uses namespaced attributes to add looping/conditionals
- Extremely Fast,
o runtime is at least 4 time smaller than most other template engines (eg. Smarty)
o uses compiled templates, as a result it is many times faster on blocks and loops than
than Regex templates (eg. IT/phplib)
- Safer (for cross site scripting attacks)
o All variables default to be output as HTML escaped (overridden with the :h modifier)
- Multilanguage support
o Parses strings out of template, so you can build translation tools
o Compiles language specific templates (so translation is only done once, not on every request)
- Full dynamic element support (like ASP.NET), so you can pick elements to replace at runtime
Features:
- {variable} to echo $object->variable
- {method()} to echo $object->method();
- {foreach:var,key,value} to PHP foreach loops
- tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional HTML inclusion
- {if:variable} to PHP If statement
- {if:method()} to PHP If statement
- {else:} and {end:} to close or alternate If statements
- FORM to HTML_Template_Flexy_Element's
- replacement of INPUT, TEXTAREA and SELECT tags with HTML_Template_Flexy_Element code
use FLEXY:IGNORE (inherited) and FLEXY:IGNOREONLY (single) to prevent replacements
- FLEXY:START/FLEXY:STARTCHILDREN tags to define where template starts/finishes
- support for urlencoded braces {} in HTML attributes.
- documentation in the pear manual
- examples at http://cvs.php.net/cvs.php/pear/HTML_Template_Flexy/tests/
** The long term plan for Flexy is to be integrated as a backend for the
Future Template Package (A BC wrapper will be made available - as I need
to use it too!)
Related Links
-------------
Package home: http://pear.php.net/package/HTML_Template_Flexy
Changelog: http://pear.php.net/package/HTML_Template_Flexy/download/1.1.0
Download: http://pear.php.net/get/HTML_Template_Flexy-1.1.0.tgz
Authors
-------------
Alan Knowles <alan@akbkhome.com> (lead)