Hi, I am having a weird problem with Fast Template. My first guess is that the problem is somewhere within the closing tags for HTML or PHP, but all seems to be in order. I have the patched version of FAST Template and have tried escaping the "{"'s but for some reason, when I try to embed PHP within html for the left pane, nothing is outputted and the php source code is visible from "View Source". Seems as for some reason the server decides not to compile the php code. The set up from FAST TEMPLATE is:
function pageStart($title = '') {
GLOBAL $tpl;
$tpl = new FastTemplate("./templates");
$tpl->define( array( 'test_main' => 'test_main.htm',
'top' => 'top.htm',
'left' => 'left.php',
'bottom' => 'bottom.htm' ) );
$tpl->assign('TITLE', $title);
ob_start();
}
function pageFinish() {
GLOBAL $tpl;
/ get page contents /
$content = ob_get_contents();
ob_end_clean();
$tpl->assign('CONTENT', $content);
/ construct the page /
$tpl->parse('TOP', 'top');
$tpl->parse('LEFT', 'left');
$tpl->parse('BOTTOM', 'bottom');
$tpl->parse('TEST_MAIN', 'test_main');
/ output the page /
$tpl->FastPrint('TEST_MAIN');
}
The problem is with the file left.php. All the other template components display fine. When I view left.php outside of the template it displays with all the correct information. But when, I load the main page using the template...nothing is outputted except some code remnants (within quotes) "'; ?>" from the following line of code within left.php:
<? echo '<a href="http://' , ($link),'">'; ?>
The code looks fine. Any new ideas would be great. I've tried to figure this out for weeks now.
Thanks,
Dare