FXL TemplateAn easy to use template engine covering all the basic features of a template system. | |
Download |
FXL Template Ranking & Summary
Advertisement
- License:
- LGPL
- Price:
- FREE
- Publisher Name:
- Steffen Reinecke
- Publisher web site:
- http://www.feverxl.org/
FXL Template Tags
FXL Template Description
An easy to use template engine covering all the basic features of a template system. FXL Template is an easy to use template engine that covers all the basic features of a template system. It supports simple text/array assignments, blocks and nested blocks. Well- used regular expressions and the simple markup are responsible for quick rendering. The template markup is really easy to learn - even for people not into programming. Everything can be done with just two types of place holders. For high traffic enviroments you are invited to test our "memcached" cache extension.hello world example:Template (example.tpl){greeting}PHP-Code (demo.php)require_once 'fxl_template.inc.php';$fxlt = new fxl_template('example.tpl');$fxlt- >assign('greeting', 'hello world!');$fxlt- >display;Outputhello world!more complex example:Template (example.tpl)< table > < !-- START row -- > < tr > < !-- START cell -- >< td >{td_value}< /td >< !-- END cell -- > < /tr > < !-- END row -- >< /table >PHP-Code (demo.php)require_once 'fxl_template.inc.php';$fxlt = new fxl_template('example.tpl');$fxlt_row = $fxlt- >get_block('row');$fxlt_cell = $fxlt_row- >get_block('cell');for ($tr = 1; $tr < = 3; $tr++) { for ($td = 1; $td < = 3; $td++) { $fxlt_cell- >assign('td_value', $tr.':'.$td); $fxlt_row- >assign('cell', $fxlt_cell); $fxlt_cell- >clear(); } $fxlt- >assign('row', $fxlt_row); $fxlt_row- >clear();}$fxlt- >display();Output< table > < tr > < td >1:1< /td >< td >1:2< /td >< td >1:3< /td > < /tr > < tr > < td >2:1< /td >< td >2:2< /td >< td >2:3< /td > < /tr > < tr > < td >3:1< /td >< td >3:2< /td >< td >3:3< /td > < /tr >< /table > Requirements: · PHP 5.1 or later · Memcache extension · setup of pcre.backtrack_limit, pcre.recursion_limit (PHP 5.2+)
FXL Template Related Software