Feature #102261
closedAllow <f:be.pageRenderer> to unregister CSS files
0%
Description
Backend Module authors may want to deliver a fully customized
backend without the CSS framework of TYPO3.
Currently the pageRenderer is only able to register
additional CSS files for output, but the access to
the internal $cssFiles
property is gated and no
event or get/setter allows to access it.
This patch adds the ability to both retrieve the
current list of $cssFiles
and also a removeCssFile()
method.
The ViewHelper is enhanced to allow access to these
methods, because when Extbase actions are executed,
accessing the PageRenderer singleton instance does
not yet have the internal stylesheets assigned.
A modules Fluid template could then do this:
<f:be.pageRenderer includeJavaScriptModules="{ 0: '@typo3/backend/global-event-handler.js', 1: '@typo3/belog/backend-log.js' }" removeCssFiles="{ 0: 'backend.css' }" />
The array passed to removeCssFiles
can contain
any string to match against the registered files,
so whole paths or specific files can be removed,
no matter if EXT:xxx
syntax or a absolute file
(like for backend.css) is used.
(The Fluid viewhelper will also work for Backend modules
outside Extbase context.)