[TYPO3] Parsing CSS files - is it possible?

Christopher bedlamhotel at gmail.com
Tue May 23 21:30:34 CEST 2006


Hello again,

On 5/23/06, Cyprian Kowalczyk <cyprian at pi2.pl> wrote:
> On Tue, 23 May 2006 17:56:17 +0200, Christopher <bedlamhotel at gmail.com>
> wrote:
>
> >
> > On the other hand though, is there any reason for not using an
> > absolute path? (E.g. "http://domain.tld/file.css" or "/file.css")
>
> Yeah, the css file is inside my extension's dir and, for instance, it can
> be installed locally or globally.

Well from _inside_ the extension, you have at least a couple of alternatives:

1. Add the css to the head of pages using TS (this method is used in
many extensions, and will probably allow you to use an absolute path
to the image)

2. Parse the contents of the css file and add them to a temp
stylesheet using the same mechanism that "config.inlineStyle2TempFile"
uses:

$GLOBALS['TSFE']->pSetup['CSS_inlineStyle'] .= $cssOutput;

3. Generate the appropriate styles in the extension and add them into
the page head using some variant on "page.headerData = ... "


-Christopher



More information about the TYPO3-english mailing list