[phplib-dev] cvs commit From: uw (phplib-dev <email protected>)
Date: 09/22/00

From: uw
Date: Fri Sep 22 13:42:02 2000
Added files:
      php-lib/php/ext/integratedtemplate.inc
      php-lib/php/ext/integratedtemplateextension.inc

Log message:
One of our customers could not understand that a template has to be split
into several files, I had to do lots of work to separate the file into
multiple files and I did not really like the (stable) template.inc block
API. It
offers me more features than usually needed and is a little confusing if
you're using it only occasionally or the first time.

Integrated Templates (IT) block API lacks the possibility to define handle
names that
differ from block names but is quite simple (note that the names are not
isofied yet):

// set the block you are referring to
setCurrentBlock( string blockname );

// repeat this as often as you need it
setVariable( array ( string varname => mixed valie ) );
parseCurrentBlock();

The Extension ITX provides methods to cover the full (stable) template.inc
functionality. Using addBlock() and addBlockfile() you can have blocks in
external files. addBlock() changes a variable placeholder to a block
quite the same as with template.inc and a combination of set_file()
and parse().

Warning: The API has not been isofied yet. It does not follow the PHPlib
naming conventions and will probably change! Sorry, I wrote the code
for a different project with different naming convention and I don't have
the time to change it currently.

PS: Kris uses "Isotopp" as a nick. "Isofied" means...

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>