[TYPO3-english] Add conditional CSS through Templavoila

Nathan Lenz typo3 at k9tfk.com
Fri Feb 20 18:07:46 CET 2009


I see that conditional CSS is not supported in Templavoila:

<!--[if IE 6]><link href="/myfile/path/ie6.css" rel="stylesheet"
type="text/css" /><![endif]-->

because the Typo3 HTML parser doesn't support it.
http://lists.netfielders.de/pipermail/typo3-project-templavoila/2008-March/002964.html


The obvious solution would be to add it using Typoscript:

page.headerData.100 = TEXT
page.headerData.100.value = <!--[if IE 6]><link
href="/myfile/path/ie6.css" rel="stylesheet" type="text/css" /><![endif]-->

However, that puts it above the standard style sheets included by
Templavoila.  This means the style sheets don't cascade properly. I can
force it by adding !important to all the styles in the ie6.css, but that
seems ugly.


Is there a way to add content to the header right above the </title> tag?


(I know I could just not set the styles in Templavoila and add them all
through typoscript and headerData, but I do different Templavoila
designs based on _only_ the style sheet includes... so this would take
away the nice aspect of changing designs to change css includes.)

Thanks for any advice,

--Nathan


More information about the TYPO3-english mailing list