FRAMIREZS
Posts: 6
|
Posted: 02/25/2004, 10:26 AM |
|
Is it possible save a template parse results into a file using $Tpl variable?
Then I want to use this html file for generating a pdf file with a external program (HTMLDOC)
And finally redirect the page to that pdf file.
I resolve this problem using smarty but I would like to integrate the code with CCS using CCS templates
Thanks
|
|
|
peterr
Posts: 5971
|
Posted: 02/25/2004, 12:09 PM |
|
For general info see http://forums.codecharge.com/posts.php?post_id=25411
In PHP the same could be done by replacing
$Tpl->PParse("main", false);
with
$Tpl->Parse("main", false);
$myVar = $Tpl->getvar("main");
print $myVar;
or use PHP output buffering features (http://www.php.net/manual/en/ref.outcontrol.php) in "Before Unload" page event :
function page_InitializeView() {
ob_start(); // enable buffering
}
function page_beforeunload() {
$myVar = ob_get_contents(); // get buffer content
}
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|