Introduction

Introduction --  What HTML_Template_Flexy can do

Introduction

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 engines 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.

How does HTML_Template_Flexy differ from other template systems

If you look around you will see there are other template systems available in PHP, they generally fall into two categories, Replacement Systems, or PHP Code builders.

Replacement systems like HTML_Template_IT, FastTemplate, PhpLib Template tend to be slower at doing block and nested block type templates and involve alot of code to add each variable to the template.

Php Code builders like Flexy, Smarty, SimpleTemplate (now HTML_Template_Xipe) tend better at more complex templates, and can offer a better approach to extendability.

With Version 0.2, and the introduction of a full Lexer, Flexy offers unique HTML integration with it's foreach,if attributes and the ability to replace HTML Forms with standard PHP code.

Typical use example

Flexy template is normally called from within a Controller Class (in the Model,View,Controller paragam). You just send HTML_Template_Flexy, the name of the template, and the object to output. - any variable you want printing out just has to be set in the object being used to ouput.

Now the example template,

And the output