Re: [phplib] Another bug with PHPLib Templates From: Olivier DEMAH (odemah <email protected>)
Date: 03/23/01

in http://phplib.netuse.de/documentation/documentation-4.html#ss4.2
you can see that no { } are needed in the $t->set_block
i use template and have no pb like you explain.

i even use block of block
<!-- BEGIN customer -->
   {NAME}
   <!-- BEGIN order -->
       {ORDER_NO} {ORDER_DATE}
   <!-- END order -->
<!-- END customer -->

php code is little bit complicate but very useful.
if you want i can show it to you.
 
Le Jeudi 22 Mars 2001 21:03, Aaron Webb a écrit :
> These may already be documented, i'm not sure ... but the list archive
> appears to be 'under construction' ...
>
> When setting a block using set_block($parent, $handle, $name = ""), the
> only way to get the block properly substituted as a variable called {block}
> (for example) is to explicitly put in the braces yourself, i.e.
>
> if you have a block like this in a file called $filename:
> <!-- BEGIN block -->
> {var}
> <!-- END block -->
>
> then the following php code works ONLY if the braces are placed around
> {somerows}:
>
> //this will output a list of numbers 0 to 9:
>
> $t->set_file("thefile", "$filename");
>
> $t->set_block("thefile", block, "{somerows}");
>
> for($i=0;$i<10;$i++) {
> $t->$set_var("var", "$i");
> $t->parse("somerows", "block", true);
> }
>
> It's weird, and I just found it out thru experimentation. Some sort of
> bug? I'm using phplib-7.2b.
>
>
> Aaron Webb
> Software Developer, Core Networks
> Aaron.Webb <email protected>
> www.CoreNetworks.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>

-- 
Membre Fondateur de PhpFR : http://phpfr.org
Membre de l'Association GCU : http://gcu-squad.org
Membre du réseau "unixlibres" : http://unixlibres.net/dyn.php/main

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