Procházet zdrojové kódy

fix the 'missing theme-.css' error when no theme is set

Olivier Massot před 5 roky
rodič
revize
2ea5198f8c

+ 8 - 0
ot_templating/Configuration/TypoScript/setup.txt

@@ -136,9 +136,17 @@ plugin.tx_ottemplating {
 
         # computed
         structureLogoUrl = {$plugin.tx_ottemplating.settings.opentalent.fileStorageUrl}{$plugin.tx_ottemplating.settings.organization.logoid}/0x60
+
+        # Default values for flux parameters
+        themeColor = blue
+        displayCarousel = 1
+        staticDonors = 0
+        eventsLimit = 5
+        eventsPeriod = 8
     }
 }
 
+
 # **** Form extension ****
 # @see https://docs.typo3.org/c/typo3/cms-form/9.5/en-us/Introduction/Index.html
 

+ 5 - 0
ot_templating/Resources/Private/Partials/Assets.html

@@ -0,0 +1,5 @@
+{namespace v=FluidTYPO3\Vhs\ViewHelpers}
+
+<f:comment><!-- Assets included with the VHS viewhelper --></f:comment>
+
+<v:asset.style name="theme" path="EXT:ot_templating/Resources/Public/assets/style/theme-{settings.themeColor}.css" debug="0"/>

+ 2 - 2
ot_templating/Resources/Private/Partials/Header.html

@@ -1,8 +1,8 @@
 {namespace v=FluidTYPO3\Vhs\ViewHelpers}
 <f:comment><!--Header partial: contains various partials, like topbar, cariousel, breadcrumb...--></f:comment>
 
-<v:asset.style path="EXT:ot_templating/Resources/Public/assets/style/theme-{settings.themeColor}.css" name="theme" debug="0">
-</v:asset.style>
+<f:comment><!-- Render the assets' includes --></f:comment>
+<f:render partial="Assets" />
 
 <header>
     <f:comment><!-- Render the topbar defined in partial/Topbar.html--></f:comment>