Hello,
I am trying to work out how to have smarty use a string's contents as the
display-> template..
ie:
$smarty->display($buffe r);
obviously $buffer isn't a filename, but a smarty template inside a string
variable. Take this example:
<snip>
<?php
ob_start('ob_ca llback');
$smarty = new smartyLocal();
$smarty->assign('var1 ', 'test');
ob_callback($bu ffer) {
$smarty->display($buffe r);
}
?>
<html><head><ti tle>page</title></head>
<body>
{$var1}
</body>
</html>
EOF
What do you guys think? Anyway to do this?
I am trying to work out how to have smarty use a string's contents as the
display-> template..
ie:
$smarty->display($buffe r);
obviously $buffer isn't a filename, but a smarty template inside a string
variable. Take this example:
<snip>
<?php
ob_start('ob_ca llback');
$smarty = new smartyLocal();
$smarty->assign('var1 ', 'test');
ob_callback($bu ffer) {
$smarty->display($buffe r);
}
?>
<html><head><ti tle>page</title></head>
<body>
{$var1}
</body>
</html>
EOF
What do you guys think? Anyway to do this?
Comment