Hi Brian,
You can use eval to parse your template code before outputting.
For example if you have a variable $buffer in php file
$buffer =
'<html><head><title>page</title></head>
<body>
{$var1}
</body>
</html>';
$smarty->assign('var1', 'test');
$smarty->assign('buffer', $buffer);
You can code your smarty template file as follows
{eval var=$buffer assign="parsedBuffer"}
{$parsedBuffer}
-- Rahul
"Brian" <cpnmscg02 (@) sneakemail.com> wrote in message news:<qwJEb.402615$Dw6.1250605@attbi_s02>...
I know, that should have been "function ob_callback($buffer)", I just meant
it as an example.
"Brian" <cpnmscg02 (@) sneakemail.com> wrote in message
news:pvJEb.402610$Dw6.1250589@attbi_s02... Hello,
I am trying to work out how to have smarty use a string's contents as the
display-> template..
ie:
$smarty->display($buffer);
obviously $buffer isn't a filename, but a smarty template inside a string
variable. Take this example:
<snip>
<?php
ob_start('ob_callback');
$smarty = new smartyLocal();
$smarty->assign('var1', 'test');
ob_callback($buffer) {
$smarty->display($buffer);
}
?>
<html><head><title>page</title></head>
<body>
{$var1}
</body>
</html>
EOF
What do you guys think? Anyway to do this?