IT and + files

From: Date: Sat, 05 Oct 2002 14:30:21 +0000
Subject: IT and + files
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2442@lists.php.net to get a copy of this message
Hi, I've always used IT with only a template file in a file. Now I need to parse a template file in a block of another template (maybe IT is not been made for this..) but i have seen it could pe possible doing it in this way: <code> $tpl = new HTML_Template_IT ( $path_template); $tpl->loadTemplatefile( $template1,true,true); ... ... $menu = $tpl->get(); unset ($tpl); $tpl = new HTML_Template_IT ( $path_template); $tpl->loadTemplatefile( $template2,true,true); $tpl->setVariable( 'menu', $menu); $tpl->show(); </code> Could be possible doing this usin only 1 istance of the class? I've try using $tpl->free() instead unset ($tpl); $tpl = new HTML_Template_IT ( $path_template); but 2nd loadTemplate return a warning: The name of a block must be unique within a template. Found "$blockname" twice. Unpredictable results may appear."__global__' has someone an idea why (no.. there are not 2 blocks with the same name, i thinks the problem is the __global__ block)? Thanks Emiliano Saurin ||

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