Re: 2 templates ?

From: Date: Fri, 13 Dec 2002 12:30:34 +0000
Subject: Re: 2 templates ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2975@lists.php.net to get a copy of this message
Mauro Romano Trajber wrote:
Hi all. Im using PEAR to manage HTML templates. I dont have problems with a single HTML template. But now im trying to integrate 2 templates.How can i do this ? I wrote this and doesnt work: <? require_once "HTML/IT.php"; $tpl = new IntegratedTemplate("../templates"); $tpl2 = new IntegratedTemaplete("../templates"); $tpl2->loadTemplatefile("test2.tpl.html", true, true); $tpl->loadTemplatefile("test1.tpl.html", true, true); $tpl->setCurrentBlock("TEST"); $tpl->setVariable("DATA",$tpl2->show()); make that $tpl2->get()
And you need to put something into $tpl2 before that, and parse the blocks of it..
$tpl->parseCurrentBlock("TEST"); $tpl->show(); ?> Sorry my english... Thanks for any help. Mauro! Maarten


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