Feature #22653

Possibility to hook individual extension-css to css temp file -> css new scriptmerger

Added by Christian Leicht over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-06-01
Due date:
% Done:

0%

PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

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)


Related issues

Related to TYPO3 Core - Bug #22546: Add a compressor/concatenator for CSS and JS to TYPO3 Closed 2010-04-29
Duplicated by TYPO3 Core - Bug #17805: Possibility to hook individual extension-css to css temp file -> css new scriptmerger Resolved 2010-06-01
Duplicated by TYPO3 Core - Bug #17804: Possibility to hook individual extension-css to css temp file -> css new scriptmerger Please read the dicription Resolved 2010-06-01

History

#1 Updated by Steffen Ritter over 7 years ago

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

#2 Updated by Tolleiv Nietsch over 7 years ago

@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 ?

#3 Updated by Steffen Ritter over 7 years ago

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.

#4 Updated by Steffen Gebert over 7 years ago

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!

#5 Updated by Tolleiv Nietsch over 7 years ago

@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 ...

#6 Updated by Steffen Ritter over 7 years ago

Closed as requested

Also available in: Atom PDF