I am currently getting the following errors:
Warning: Undefined property: main in c:\inetpub\wwwroot\common\class.FastTemplate.php3 on line 377
Warning: Undefined property: ROW in c:\inetpub\wwwroot\common\class.FastTemplate.php3 on line 303
My code is:
<?php
include("./common/class.FastTemplate.php3");
// Normal code
$text = array( 0 => "This is line one",
1 => "This is line two",
2 => "This is line three" );
// Begin FastTemplate code
$tpl = new FastTemplate("./template");
$tpl->define(array('main' => "default.tpl"));
$tpl->define_dynamic('row' , 'main');
for($i=0;$i<3;$i++){
$tpl->assign('LINE', $text[$i]);
$tpl->parse('ROW' , '.row');
}
$tpl->parse('MAIN','main');
$tpl->FastPrint('MAIN');
/
$raw = $tpl->fetch("MAIN");
echo "$raw\n";
/
?>
And my template is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>Test Page for Dynamic Template block</title>
</head>
<body>
<!-- BEGIN DYNAMIC BLOCK: row -->
<div align="center">{LINE}</div>
<!-- END DYNAMIC BLOCK: row -->
</body>
I can't see why these errors are occurring... please help!
Lee.