[SOLVED] How to avoid template echo
Posted: Fri Feb 15, 2013 1:02 pm
Hello, is there a way to avoid cmsms template display when echoing a variable from inside a module?
I'm generating an html page on the fly, storing its html code in a variable ($html_body), and forcing a file download, in this way:
The downloaded file also contains the cmsms template, while I should need it has only the html I put in $html_body var.
How can I disable cmsms template? Is there a way to use something like "showtemplate=false"?
(I hope my explanation was quite clear...)
thank you
I'm generating an html page on the fly, storing its html code in a variable ($html_body), and forcing a file download, in this way:
Code: Select all
$filename = 'myfilename__'.strtolower(str_replace(" ", "_", $username)).'__'.time().'.html';
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Type: application/octet-stream; charset=utf-8 ");
header("Content-Transfer-Encoding: binary");
echo ($html_body);
How can I disable cmsms template? Is there a way to use something like "showtemplate=false"?
(I hope my explanation was quite clear...)
thank you