ITX API questions

From: Date: Fri, 27 Jul 2001 15:03:42 +0000
Subject: ITX API questions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1093@lists.php.net to get a copy of this message
Ulf, I have made some changes in ITX.php in order to make it work with external files. Now one can use addBlock and addBlockfile. But I have a problem with the global implementation of the template system. I would like to be able to use a block like : <!-- BEGIN BLOCK1 --> {TITLE} {CONTENT} <!-- END BLOCK1 --> and then set BLOCK1 as the current block, add an external template file in CONTENT variable using addBlockfile, then parse it using parseCurrentBlock. (this works ok for now). But when, after that, I want to parse it again using some text for CONTENT instead of the external template (setVariable("CONTENT","text here")), it just won't work. I wonder if it wouldn't be better to unset variable currentBlock once the current block is parsed and set current block again if one want to parse it again ? This could help to manage blocks hierarchy ? but will break the API. I would like to know if you have any opinion or clues on that one. Thanks, Bertrand Mansion Mamasam

« previous php.pear.dev (#1093) next »