Feature #17640 » csscondition.diff
typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) | ||
---|---|---|
if (!is_array($iCSSfile)) {
|
||
$ss=$GLOBALS['TSFE']->tmpl->getFileName($iCSSfile);
|
||
if ($ss) {
|
||
if ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['import']) {
|
||
// patch for Browser Conditions
|
||
// e.G. set following in TS:
|
||
// page.includeCSS.file1.browserCondition = IE 7
|
||
$cssWrap=$GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['browserCondition'] ? array('<!--[if '.$GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['browserCondition'].']>',"\n".'<![endif]-->') : array('','');
|
||
|
||
if ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['import']) {
|
||
if (substr($ss,0,1)!='/') { // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
|
||
$ss = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/'.$ss;
|
||
}
|
||
$GLOBALS['TSFE']->content.='
|
||
$GLOBALS['TSFE']->content.=$cssWrap[0].'
|
||
<style type="text/css">
|
||
<!--
|
||
@import url("'.htmlspecialchars($ss).'") '.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media']).';
|
||
-->
|
||
</style>
|
||
';
|
||
'.$cssWrap[1];
|
||
} else {
|
||
$GLOBALS['TSFE']->content.='
|
||
$GLOBALS['TSFE']->content.=$cssWrap[0].'
|
||
<link rel="'.($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['alternate'] ? 'alternate stylesheet' : 'stylesheet').'" type="text/css" href="'.htmlspecialchars($ss).'"'.
|
||
($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['title'] ? ' title="'.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['title']).'"' : '').
|
||
($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media'] ? ' media="'.htmlspecialchars($GLOBALS['TSFE']->pSetup['includeCSS.'][$key.'.']['media']).'"' : '').
|
||
' />';
|
||
' />'.$cssWrap[1];
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
// *************************
|
||
require_once(PATH_tslib.'class.tslib_content.php');
|
||
?>
|
||
?>
|