benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
336 stars 202 forks source link

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

Closed h-e-l-l-o-w-o-r-l-d closed 1 year ago

h-e-l-l-o-w-o-r-l-d commented 3 years ago

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.

benjaminkott commented 3 years ago

@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!

h-e-l-l-o-w-o-r-l-d commented 3 years ago

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

gilbertsoft commented 3 years ago

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

Pull requests are always welcome :)