[TYPO3-english] Build HTML page in backend : I get a warning

Gregory Loichot gloichot at cross-systems.ch
Thu Apr 23 17:43:42 CEST 2009


Hello,

I need to build an HTML page in the backend. So I did :

$doc = t3lib_div::makeInstance('template');
$doc->backPath	= $BACK_PATH;
$doc->docType 	= 'xhtml_trans';
$content = $doc->startPage('Parent Element');
$content .= '<h1>Parent Element(s)</h1>';
$content .= $doc->endPage();
echo $content;

But, when this page is displayed, a warning appears :

Warning: Cannot modify header information - headers already sent by 
(output started at 
/var/www/finaltest/typo3conf/ext/crossportal/getParentElement.php:1) in 
/var/src/typo3_src-4.2.6/typo3/template.php on line 633


getParentElement.php is where I build my backend page.

If I comment $content = $doc->startPage('Parent Element');, there is no 
more warning.

Does somebody know why ?
Thank you


More information about the TYPO3-english mailing list