Date: 10/30/00
- Next message: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Previous message: carlos <email protected>: "[phplib] Template vs FastTemplate"
- Maybe in reply to: carlos <email protected>: "[phplib] Template vs FastTemplate"
- Next in thread: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Reply: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've read a post in phpbuilder. All i have to do is upgrade from phplib
7.2.b to phplib 7.2.c.
I still want to know if there are any benefits using phplib's template over
FastTemplate (Nested dynamic blocks, for example???)
carlos <email protected>
Para: phplib <email protected>
30/10/00 cc:
13.19 Asunto: [phplib] Template vs FastTemplate
Hello all.
I'm trying to rewrite all my FastTemplate code in order to use phplib's
template.
First: What is the equivalent code for:
<!--- The template: table.tpl --->
<table>
<!-- BEGIN DYNAMIC BLOCK: row -->
<tr><td>
{something}
</td></tr>
<!-- END DYNAMIC BLOCK: row -->
</table>
<!--- The code: table.php --->
<?php
include("./lib/class.FastTemplate.inc");
$tpl = new FastTemplate(".");
$tpl->define(array(
"table" => "tpl/table.tpl",
));
$tpl->define_dynamic("row", "table");
for ($i=0; $i<$limit; $i++) {
$tpl->assign(array("something" => "$i"));
$tpl->parse("rows", ".row");
}
$tpl->parse("out", "table");
$tpl->FastPrint();
I now it seems easy, but translating all the calls to FastTemplate
functions with calls to phplib's template functions it returns a "rows"
word and not the contents of the "rows" var
Second: Which are the benefits of phplib's template? Can phplib's template
have nested dynamic blocks? Can anybody send me an example?
Thanks!!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Previous message: carlos <email protected>: "[phplib] Template vs FastTemplate"
- Maybe in reply to: carlos <email protected>: "[phplib] Template vs FastTemplate"
- Next in thread: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Reply: Jeroen Laarhoven: "Re: [phplib] Template vs FastTemplate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

