Location: PHPKode > scripts > phplibTemplateExtention > phplibtemplateextention/example_usage.php
<?
/* example call to AppTemplate class - which extends phplibs Template class */


$t = new AppTemplate("main", "main_page.ihtml", "templates");
foreach($select as $v=>$sl){


        $t->set_var("colspan", count($sl));
        $t->set_var("style_name", $v);
        foreach($sl as $s){
                $t->set_var("select", $s);
                  //blocks generated names are always 'blockName'_block 
                  //eg <!-- BEGIN block2 --> becomes block2_block 
                $t->parse("block2_block", "block2", 1);
        }

        $t->parse("block1_block", "block1", 1);

}
$t->set_var("prodID", $prodID);
$t->set_var("html_output", "$output");
$t->set_var("phpself", $PHP_SELF);
$t->pp("output", "main");


?>
Return current item: phplibTemplateExtention