[TYPO3-core] RFC: #11397: [Feature] Add class for render HTML header/footer for BE and FE

Steffen Gebert steffen at steffen-gebert.de
Mon Aug 31 17:12:25 CEST 2009


On Sun, 30 Aug 2009 00:54:19 +0200, Steffen Gebert  
<steffen at steffen-gebert.de> wrote:

> * What's the sense of ###POSTJSMARKER###? It's only replaced in BE. In  
> FE output is <!-- ###POSTJSMARKER### -> (as written in the template).  
> Don't like this unneccessarey output.
>
> * pagerender: 1230
> if ($this->compressJavascript &&  
> $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['cssCompressHandler']) {
> hast to be $this->compressCss
>
> * I think removeEmptyLinesFromTemplate is never set to TRUE. Furthermore  
> it wouldn't remove empty lines, but all line breaks, doesn't it?
>
> * If config.concatenateJSandCSS = 1, there's an access to protected  
> variable concatenateFiles. So please add a setter and call it in  
> pagegen:958 instead of setting the variable directly.
>
> * I tried to implement a simple CSS compressor:
> function user_concatter($params, $ref) {
> 	$code = '';
> 	foreach ($params['cssFiles'] as $file => $settings) {
> 		$code .= file_get_contents(PATH_site . $file);
> 		unset($params['cssFiles'][$file]);
> 	}
> 	$concatted = 'typo3temp/concatted.css';
> 	t3lib_div::writeFileToTypo3tempDir(PATH_site . $concatted, $code);
> 	$ref->addCssFile($concatted);
> }
>
> Of course, this doesn't work as $params is later neglected. So what  
> worked was changing pagerender to
> $params = array(
> 	'jsFiles'	=> &this->jsFiles,
> 	'jsFooterFiles'	=> &this->jsFooterFiles,
> 	'cssFiles'	=> &this->cssFiles,
> );
> (so passing by reference).
> Otherwise I had no idea, how to remove the unnecessary CSS files (as  
> there's no removeCssFile()).

If the remarks above are fixed (or disproved), you have my +1 by reading  
and testing.

Steffen


More information about the TYPO3-team-core mailing list