Re: PEAR Integrated Template Class

From: Date: Sun, 22 Jul 2001 11:42:16 +0000
Subject: Re: PEAR Integrated Template Class
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-222@lists.php.net to get a copy of this message
Hi, power! /Sun, 22 Jul 2001 11:05:28 -0700/ you wrote: pj> Sorry but i don't really understand german. pj> I'm totally clueless on where to start pj> using the IT class. Can someone help pj> shed light to me on this. pj> I would appreciate some sample codes. Here is the small example below. It is very simple, basic example, but IT[X] has many more powerful and useful features. >./IT_test.php <?php // initialization require_once("HTML/IT.php"); $tpl = new IntegratedTemplate("./templates"); $tpl->loadTemplateFile("IT_tpl.tpl",false,TRUE); // "static" example $tpl->setVariable(TITLE,'IT test'); // dynamic block example for ($i=0; $i<3; $i++) { $tpl->setVariable('I_COUNT',$i); $tpl->parse('row'); } // output result $tpl->show(); ?> >./templates/IT_tpl.tpl <HTML> <BODY> {TITLE} <table border="1"> <tr><th><b>No</b></th> <th>text</th></tr> <!-- BEGIN row --> <tr><td><b>{I_COUNT}</b></td> <td>block{I_COUNT}</td></tr> <!-- END row --> </table> </BODY> </HTML> BTW,here is the link to IT[X] phpdoc-generated documentation: http://www.ulf-wendel.de/docs/itx/index2.html Hope it helps. -- Best regards, Ed

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