From 96c9d2c071d8c22db70ec970860fc9f007127702 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk <beatrycze.volk@slub-dresden.de> Date: Tue, 22 Aug 2023 12:23:17 +0200 Subject: [PATCH] Add option for disabling CSS and JS files --- Configuration/TypoScript/constants.typoscript | 9 +++++++++ Configuration/TypoScript/setup.typoscript | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index f7abe2c..df2fe7c 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -1,3 +1,12 @@ +config { + tx_bison { + # cat=config.tx_bison; type=int[0-1]; label=Disable CSS files + disableCss = 0 + # cat=config.tx_bison; type=int[0-1]; label=Disable JS files + disableJs = 0 + } +} + plugin.tx_bison_recommender { view { # cat=plugin.tx_bison_recommender/file; type=string; label=Path to template root (FE) diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index e6198e8..e8f41d3 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,4 +1,6 @@ page { + + [{$plugin.tx_bison.disableCss} == 0] includeCSS { bison_bootstrap = EXT:bison/Resources/Public/Css/bootstrap-5.2.2-dist/bootstrap.min.css bison_bootstrap { @@ -7,7 +9,9 @@ page { } bison_layout = EXT:bison/Resources/Public/Css/layout.css } + [END] + [{$plugin.tx_bison.disableJs} == 0] includeJSFooterlibs { bison_bootstrap = EXT:bison/Resources/Public/JavaScript/bootstrap-5.2.2-dist/bootstrap.bundle.min.js bison_bootstrap { @@ -19,6 +23,7 @@ page { disableCompression = 1 } } + [END] } plugin.tx_bison_recommender { -- GitLab