Project

General

Profile

Bug #60213 ยป patch_60213.diff

Bernhard Kraft, 2014-07-09 18:47

View differences:

typo3/sysext/backend/Classes/Template/DocumentTemplate.php
}
}
// Construct page header.
$str = $this->pageRenderer->render(PageRenderer::PART_HEADER);
$str = $this->pageRenderer->render(PageRenderer::PART_HEADER, FALSE);
$this->JScodeLibArray = array();
$this->JScode = ($this->extJScode = '');
$this->JScodeArray = array();
typo3/sysext/core/Classes/Page/PageRenderer.php
* Render the section (Header or Footer)
*
* @param integer $part Section which should be rendered: self::PART_COMPLETE, self::PART_HEADER or self::PART_FOOTER
* @param boolean $resetRenderer When set to FALSE the renderer ($this) will not get reset. This is useful for succesively rendering header and footer parts.
* @return string Content of rendered section
*/
public function render($part = self::PART_COMPLETE) {
public function render($part = self::PART_COMPLETE, $resetRenderer = TRUE) {
$this->prepareRendering();
list($jsLibs, $jsFiles, $jsFooterFiles, $cssLibs, $cssFiles, $jsInline, $cssInline, $jsFooterInline, $jsFooterLibs) = $this->renderJavaScriptAndCss();
$metaTags = implode(LF, $this->metaTags);
......
// The page renderer needs a full reset, even when only rendering one part of the page
// This means that you can only register footer files *after* the header has been already rendered.
// In case you render the footer part first, header files can only be added *after* the footer has been rendered
$this->reset();
if ($resetRenderer) {
$this->reset();
}
return trim(\TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($template, $markerArray, '###|###'));
}
    (1-1/1)