OK I understand that 😉
But what I don't understand is how to make the code choose between the 2 templates.
This is the very first bit of php code to be called upon a request from a browser I think :
<?
include("class.FastTemplate.php3");
function pageStart($title = '') {
GLOBAL $tpl;
$tpl = new FastTemplate('.');
$tpl->define( array( 'main' => 'main.tpl',
'header' => 'header.tpl',
'footer' => 'footer.tpl' ) );
$tpl->assign('TITLE', $title);
ob_start();
}
/**
Uses FastTemplate object to construct and output the page.
Page body content comes from previously buffered output.
*/
function pageFinish() {
GLOBAL $tpl;
/ get page contents /
$content = ob_get_contents();
ob_end_clean();
$tpl->assign('CONTENT', $content);
/ construct the page /
$tpl->parse('HEADER', 'header');
$tpl->parse('FOOTER', 'footer');
$tpl->parse('MAIN', 'main');
/ output the page /
$tpl->FastPrint('MAIN');
}
?>
Any ideas how I might go about this ?
Thanks 🙂