[Typo3-dev] css_select extension
Wolfgang Klinger
wolfgang at stufenlos.net
Wed Jan 12 14:47:30 CET 2005
Hello,
I try to send this to Jean-David Gadina (info(at)macmade.net) for
two days now.. and always get an error message, please, if anyone has
his private address forward this to him, tia!
-----------
Hi,
there's a bug in your extension:
If you set "recursive" to 1 you'll get an output like:
---
<style type="text/css" media="all">
<!--
@import url("fileadmin/css/");
@import url("fileadmin/css/");
@import url("fileadmin/css/site.css");
-->
</style>
---
and so on.. an entry for each level, though there are no css files
specified for all levels...
so I changed the method getCSSFiles:
---
function getCSSFiles() {
// Checking if the recursive option si set
if ($this->conf['recursive'] == 1) {;
// Storage
$cssArray = array();
// Check each top page
foreach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {
// Add CSS files
// check if there are some specified first!!!!
if ($topPage['tx_cssselect_stylesheets']) {
$cssArray = array_merge($cssArray,explode(',',$topPage['tx_cssselect_stylesheets']));
}
}
} else if (!empty($GLOBALS['TSFE']->page['tx_cssselect_stylesheets'])) {
// Get page only stylesheets
$cssArray = explode(',',$GLOBALS['TSFE']->page['tx_cssselect_stylesheets']);
}
// Return CSS files
return $cssArray;
}
---
and btw please add an option to remove those (unnecessary) comments
before the import rules! tia
bye
Wolfgang
More information about the TYPO3-dev
mailing list