Feature #22653
closed
Possibility to hook individual extension-css to css temp file -> css new scriptmerger
Added by Christian Leicht over 14 years ago.
Updated about 6 years ago.
Description
Currently the core is not able to implement external css file (e.g. templavoila) to the css temp file.
I spoke to Tolleiv Nietsch about this problem. He told me that there is no facility in the core to transfer css data (and also js) to the temp file(s).
I think that this is necessary to provide a clean integration into the new scriptmerging.
(issue imported from #M14568)
Well,
that's only halfway correct,
the compressor includes all css files registered cleanly with the pagerenderer.
using head Data to bind it selfmade won't be possible.
But you may register "whole" directories for css to be loaded in all modules.
For backen.php you may also use sth like this:
$GLOBALS['TYPO3backend']->addCssFile('ie6fix', 'sysext/t3skin/stylesheets/ie6.css');
in own modules you just call corresponding calls to tempalte.php objekt to register your own data...
so please let me know "what exactly" is not possible due to sb.
AND PLEASE DO NOT POST AS OFTEN AS YOU LIKE HOPING TO GET MORE ATTENTION
@Steffen - ah thanks for the insight ~ is my assumption right that it's common sense to use $GLOBALS['TSFE']->getPageRenderer()->addCssFile() ... in the frontend then? and is my assumption right that this is only available in TYPO3 > 4.3 ?
Yes the way you described would be perfectly fine.
If it's the only one, I am not shure about ;) But I think, it's clean and should be the way to go!
Hoever: merging and compressing is not available for the frontend but only for backend.
Yes, using the PageRenderer is the correct way to add files in FE and BE since 4.3
You should have an instance of a doc class (normal doc, big doc, ..) which holds a reference to the PageRenderer.
Merging is only done in backend. For FE use e.g. EXT:scriptmerger. FE isn't that easy (although backend is also not easy ;-))
New in 4.4: t3lib_compress
Files inside one of
- $TBE_STYLES[skins][--skin-name--][stylesheetDirectories], if defined
- subdirectories stylesheets/structure/ and stylesheets/visual/ of registered skins
are merged into a compressed CSS.
We can't include all CSS, as every submodule would generate a different merged version which would be counterproductive, of course!
@Steffen ... I guess this issue is not relevant anymore and can be closed - I didn't know that the PageRenderer is also relevant for the Frontend and Christian just opened this issue without checking it in detail ...
- Status changed from Resolved to Closed
Also available in: Atom
PDF