Bug #72038
closedMissing $name in TYPO3\CMS\Core\Page\PageRenderer::addCssLibrary()
0%
Description
First of all, I'm not sure whether it's a bug or not. But according to addJsLibrary() and addJsFooterLibrary(), I think the index for $cssLibs should be something like strtolower($name) rather than $file. Right now, addCssLibrary() is much like addCssFile().
Updated by Markus Klein almost 9 years ago
- Status changed from New to Needs Feedback
What is your problem, and what does not work?
Updated by Bill Dagou almost 9 years ago
Sometimes, I use
$GLOBALS['TSFE']->getPageRenderer()->addCssLibrary('some.css');
in my code to include some.css in <head>, and may replace it by another.css in a hook.
What I expected is, addCssLibrary() could use a $name to identify the .css included, like what addJsLibrary() or addJsFooterLibrary() does, so
$GLOBALS['TSFE']->getPageRenderer()->addCssLibrary('css', 'some.css');
...
$GLOBALS['TSFE']->getPageRenderer()->addCssLibrary('css', 'another.css');
will only include another.css rather than both.
Updated by Bill Dagou almost 9 years ago
Never mind, I will take care of what I need in my code if it involves a lot, and you can ignore this issue and close it.
Thanks again for the whole TYPO3 team.
Updated by Georg Ringer almost 9 years ago
- Status changed from Needs Feedback to Closed
- Priority changed from Could have to Won't have this time
I will close this issue as requested. even though it would be nice to have more calls of the API look like the same, it would require a lot of deprecations to get this into a nicer shape. it would be more likely to restructure the whole class.
still thanks a lot for reporting the idea!