bootstrap_package icon indicating copy to clipboard operation
bootstrap_package copied to clipboard

[QUESTION] Recommended way to use typoscript settings from BS4 instead of default BS5

Open h-e-l-l-o-w-o-r-l-d opened this issue 2 years ago • 3 comments

Hi there,

we switched from 11.1 to 12.0 with a slightly modified BS4 which we included on our own since BP 11.1. With BP 12.0 settings for BS5 (default) are applied which of course leads to a broken frontend.

Probably a stupid question but... How can I force BP to load Typoscript settings for BS4? There's no extension-setting for this. Overriding

page { includeCSS { # bootstrap 4.x will be included in the themes.scss file # for standalone usage just uncomment the following line # bootstrap = EXT:bootstrap_package/Resources/Public/Contrib/bootstrap4/scss/bootstrap.scss theme = EXT:bootstrap_package/Resources/Public/Scss/bootstrap4/theme.scss } includeJSFooterlibs { popper = EXT:bootstrap_package/Resources/Public/Contrib/popper/popper.min.js bootstrap = EXT:bootstrap_package/Resources/Public/Contrib/bootstrap4/js/bootstrap.min.js } }

in our own extension works but is it the recommended way?

PS: Cannot replace label "bug" with "question", sorry.

h-e-l-l-o-w-o-r-l-d avatar Aug 16 '21 08:08 h-e-l-l-o-w-o-r-l-d

@h-e-l-l-o-w-o-r-l-d there are two ways

If you are running your own site package just include the bp4 typescript file in addition.

# Constants
@import 'EXT:bootstrap_package/Configuration/TypoScript/constants.typoscript'
@import 'EXT:bootstrap_package/Configuration/TypoScript/Bootstrap4/constants.typoscript'
# Setup
@import 'EXT:bootstrap_package/Configuration/TypoScript/setup.typoscript'
@import 'EXT:bootstrap_package/Configuration/TypoScript/Bootstrap4/setup.typoscript'

If you are running just a database setup you also just need to include the second static include:

image

We tried to make compact as "convenient" as possible, adapted it to the way we did it for 3.x.

Hope that helps!

benjaminkott avatar Aug 16 '21 09:08 benjaminkott

That helps, thank you! I think this should be included in the documentation. ;)

h-e-l-l-o-w-o-r-l-d avatar Aug 16 '21 09:08 h-e-l-l-o-w-o-r-l-d

That helps, thank you! I think this should be included in the documentation. ;)

Pull requests are always welcome :)

gilbertsoft avatar Aug 16 '21 10:08 gilbertsoft