Re: IT and + files

From: Date: Mon, 07 Oct 2002 08:41:21 +0000
Subject: Re: IT and + files
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2452@lists.php.net to get a copy of this message
Greetings, emiliano! Use HTML_Template_ITX and its addBlockfile() method: $tpl = new HTML_Template_ITX ( $path_template); $tpl->loadTemplatefile( $template1,true,true); $tpl->addBlockfile('menu', 'menu_block', $template2); At 05.10.2002, 18:30, you wrote: e> Hi, e> I've always used IT with only a template file in a file. e> Now I need to parse a template file in a block of another template e> (maybe IT is not been made for this..) but i have seen it could pe e> possible doing it in this way: e> <code> e> $tpl = new HTML_Template_IT ( $path_template); $tpl->>loadTemplatefile( $template1,true,true); e> ... ... $menu = $tpl->>get(); e> unset ($tpl); e> $tpl = new HTML_Template_IT ( $path_template); $tpl->>loadTemplatefile( $template2,true,true); $tpl->>setVariable( 'menu', $menu); $tpl->>show(); e> </code> e> Could be possible doing this usin only 1 istance of the class? e> I've try using $tpl->>free() e> instead e> unset ($tpl); e> $tpl = new HTML_Template_IT ( $path_template); e> but 2nd loadTemplate return a warning: e> The name of a block must be unique within a template. Found "$blockname" e> twice. Unpredictable results may appear."__global__' e> has someone an idea why (no.. there are not 2 blocks with the same name, e> i thinks the problem is the __global__ block)? -- С уважением, Алексей Борзов отдел интернет-проектов ООО "РДВ-Медиа" http://www.rdw.ru http://www.vashdosug.ru

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