0

Using TYPO3 version 8

I have a custom extension that contains three frontend plugins.

For each of the three plugins I have a separate stylesheet for each of them.

Currently, all three style sheets are loaded even if one of the plugins isn't loaded on that page.

My setup.ts:

page.includeCSS.tx_myextension_frontendpluginONE = EXT:myextension/Resources/Public/Css/frontendpluginONE.css
page.includeCSS.tx_myextension_frontendpluginTWO = EXT:myextension/Resources/Public/Css/frontendpluginTWO.css
page.includeCSS.tx_myextension_frontendpluginTHREE = EXT:myextension/Resources/Public/Css/frontendpluginTHREE.css

Question:

Using only Typoscript, can I load a stylesheet for each plugin and not have it load if the plugin is not displayed on the page? I assumed it would sit somewhere in my extension configuration:

plugin.tx_myextension_frontendpluginONE.settings {
 Call it in here perhaps?
}

Thanks again.

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
Tom
  • 109
  • 1
  • 15
  • 1
    Possible duplicate of [TYPO3: How could I add css and js files via controller initialize action and page renderer?](https://stackoverflow.com/questions/45440189/typo3-how-could-i-add-css-and-js-files-via-controller-initialize-action-and-pag) – Mathias Brodala May 09 '19 at 10:20
  • "Question:Using Typoscript, can I load a stylesheet for each plugin" – Tom May 09 '19 at 10:21
  • Yes, and the easier solution is using the `*Assets` sections in your template. – Mathias Brodala May 09 '19 at 10:30

0 Answers0