Re: Real world usage of IT [template] class?

From: Date: Thu, 04 Apr 2002 16:27:16 +0000
Subject: Re: Real world usage of IT [template] class?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1091@lists.php.net to get a copy of this message
le 4/04/02 16:51, derek fong à pear@subtitled.com a écrit : > Hmmm... so should I take it that nobody really uses PEAR's IT class? Too > bad, it looks like it could be useful... :( > > Anyway, if anyone does use it, maybe you can help me out with this one. > What is the proper way to include a file into an existing template which has > its own placeholders? I think I'm supposed to use the get_file() method, > but I can never seem to parse the placeholders in the file that's included. > > $tpl = new IntegratedTemplate("./"); > $tpl->loadTemplatefile("template.tmpl", false, false); > > // parse DMZ helper on right side of the page > $dmz_content = $tpl->getFile("template2.tmpl"); > $tpl->setVariable("DMZ", $dmz_content); > > $tpl->setCurrentBlock("dmz"); > $tpl->setVariable("DMZ_LIST", "-&nbsp;<a > href=\"test.php\">Name</a> > (#)<br>"); > $tpl->parseCurrentBlock("dmz"); > > $tpl->setCurrentBlock("main_body"); > $tpl->setVariable("USERNAME", "Derek Fong"); > $tpl->setCurrentBlock("main_body"); > ... > > What am I missing? I already posted a small example of addBlockFile usage : http://marc.theaimsgroup.com/?l=pear-dev&m=100498428025588&w=2 It is stable now, just make sure you use the last versions. Have fun, Bertrand Mansion Mamasam

« previous php.pear.general (#1091) next »