Re: Problem with IT[X], block containing blocks
| From: | Maarten Stolte | Date: | Wed, 27 Nov 2002 18:38:47 +0000 |
| Subject: | Re: Problem with IT[X], block containing blocks | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2863@lists.php.net to get a copy of this message | ||
Franz Alt wrote:
I want to create a XML - File with the IT[X] Template at the end of this mail. Can I "put a block into another block"? Like HTML-Tags can contain other Tags. My PHP-Script creates a file, but only with one "<page>" instead of three Can anybody help me? Think so:$tplMain = new HTML_Template_IT('../shared/templates/'); $tplMain->loadTemplatefile('main.tpl.html', true, true); $tplMain->setVariable("HREFWERK", '/work/'); // stepping out ;-) $tplNews->setCurrentBlock("newsblock"); $tplNews->setVariable("DATE", $date); $tplNews->setVariable("NEWSDESCRIPTION", $text); $tplNews->parseCurrentBlock("newsblock"); $area1 = $tplNews->get(); $tplMain->setVariable("TEXTBOXAREA1", $area1) ; $tplMain->parseCurrentBlock("mainblock") ; $tplMain->show(); goodluck, Maarten