Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001092

[PHP] Re: HTML/IT - bug or strange behaviour From: Jeroen Olthof (j.olthof <email protected>)
Date: 09/28/01

try this one

http://www.millipede.nl/ectemplate

greetings
Jeroen Olthof

"Wolfram Kriesing" <wolfram <email protected>> wrote in message
news:01092814512201.01028 <email protected>
> in class HTML - IntegratedTemplate
>
> blocks are processed in the order they were found when reading the
template
> file, not in the order the setVariable or parseCurrentBlock methods were
> called, which has the following effect
>
> template:
> <!-- BEGIN superBlock -->
> <!-- BEGIN block1 -->
> {value1}
> <!-- END block1 -->
>
> <!-- BEGIN block2 -->
> <font color="red">{value2}</font>
> <!-- END block2 -->
> <!-- END superBlock -->
>
> code:
> // should show block 2 first
> $tpl->setCurrentBlock("block2");
> $tpl->setVariable("value2",$myValue2);
> $tpl->parseCurrentBlock();
>
> // block 1 second
> $tpl->setCurrentBlock("block1");
> $tpl->setVariable("value1",$myValue1);
> $tpl->parseCurrentBlock();
>
> but the result is that block 1 is shown before block2.
> am i using the IT-class wrong or is that a behaviour as expected?
> i am showing either block1 or block2 as columns of a table, which means
that
> an order "block1 block2 block1 block2" is NOT possible, since internally
the
> order as parsed from the template is used, which is: first all block1's
and
> second all block2's
>
> the class IntegratedTemplate should be renamed to meet the PEAR convention
> to "HTML_IT", or not? it was irritating me some times
>
> Wolfram Kriesing

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>