Re: HTML/IT - bug or strange behaviour

From: Date: Fri, 28 Sep 2001 13:25:40 +0000
Subject: Re: HTML/IT - bug or strange behaviour
References: 1  Groups: php.general php.pear.dev 
Request: Send a blank email to php-general+get-69173@lists.php.net to get a copy of this message
try this one http://www.millipede.nl/ectemplate greetings Jeroen Olthof "Wolfram Kriesing" <wolfram@kriesing.de> wrote in message news:01092814512201.01028@hubert... > 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

« previous php.general (#69173) next »