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

David Bruchmann typo3-en at bruchmann-web.de
Thu Apr 23 18:06:39 CEST 2009


----- Ursprüngliche Nachricht -----
Von:        Gregory Loichot <gloichot at cross-systems.ch>
Gesendet:   Donnerstag, 23. April 2009 17:43:42
An:         typo3-english at lists.netfielders.de
CC:
Betreff:    [TYPO3-english]  Build HTML page in backend : I get a warning
> 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';
   $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

Try the corrected line with call of $doc->startPage.

Best regards
David



More information about the TYPO3-english mailing list