[TYPO3-core] RFC: Bug #6421: Introducing IECondition for TypoScript
Patrick Broens
patrick at patrickbroens.nl
Thu Nov 1 07:43:27 CET 2007
Martin Kutschker wrote:
> Steffen Kamper schrieb:
>> "Benjamin Mack" <mack at xnos.org> schrieb im Newsbeitrag
>> news:mailman.4173.1193745071.20721.typo3-team-core at lists.netfielders.de...
>>
>>> Hey all,
>>>
>>> this is a SVN patch request.
>>>
>>> Type: Feature
>>>
>>> BT: http://bugs.typo3.org/view.php?id=6421
>>>
>>> Branches: Trunk
>>>
>>> Problem:
>>> If you want to add so called browser conditions for the IE like
>>> <!--[if IE 7]>
>>> <link rel="stylesheet" type="text/css" href="fileadmin/style.css" />
>>> <![endif]-->
>>>
>>> you always had to do this manually (e.g. through a HeaderData object).
>>>
>>> Solution:
>>> Add a new property to page.includeCSS. With
>>> page.includeCSS.file1 = fileadmin/styles.css
>>> page.includeCSS.file1.ieCondition = IE 7
>>>
>>> you'll get the result as above.
>>>
>>> Notes:
>>> Thanks for Steffen Kemper for writing the initial patch and testing my
>>> version :).
>>>
>>>
>>> --
>>> greetings,
>>> benni.
>>> -SDG-
>>>
>>> www.xnos.de // www.xnos.org
>>>
>> +1 - reading and testing
>
> -0 because this can easily be done with page.header and the conditional
> comment construct can be used for anything anywhere within the document.
-0 for me. This can already be achieved by using conditional statements
in TS, so no new property is necessarry. Using conditions with browser
and version check makes the code even more cleaner.
Patrick
>
> Masi
More information about the TYPO3-team-core
mailing list