The right way to modify the Bootstrap Concrete5 grid - Concrete5 5.7.5.8

Permalink
Im making a theme using bootstrap 3. In this new theme im using "container-fluid" as container, instead of "container" class. i can edit the file "Concrete/src/Page/Themes/Gridframework/Type/Bootstrap3.php" But that will just be overwritten in future updates.

How do i make this adjustment correct? Do i make a new Gridframework based on Bootstrap 3? or is there a smart way to modify the existing?

/Kresten

Kresten
 
Gondwana replied on at Permalink Best Answer Reply
Gondwana
I've been wondering about this too.

I think the answer lies in creating your own grid framework:
http://documentation.concrete5.org/developers/designing-for-concret...

You may be able to get away with subclassing the extant bootstrap3 container:
http://documentation.concrete5.org/api/source-class-Concrete.Core.P...

In particular, overriding getPageThemeGridFrameworkContainerStartHTML() will allow specification of the -fluid bit (I think).

I note that bootstrap4 is coming out soon; preview versions are now available.

I'll be interested to see how you go with this!
Kresten replied on at Permalink Reply
Kresten
Hi Gondwana
Yes, my first thought was to create my owngrid framwork as u propose.

Ive never tried to make a subclass - I think i will start by exploring that option.

I know bootstrap 4 is on its way - But we have the HTML made in Bootstrap 3.x so I will keep working in that.

Kind regards
Kresten Buch
Mainio replied on at Permalink Reply
Mainio
We have created a grid framework for our Bootstrap 4 starter theme:
https://github.com/mainio/c5_theme_bootstrap4_starter...

Feel free to take a look!
Kresten replied on at Permalink Reply
Kresten
Thanks for your answer.

Unfortunately Bootstrap 4.0 is not the way to go for my project :-)

Kind regards
Kresten Buch
Mainio replied on at Permalink Reply
Mainio
What I meant is that you can take a look on how the grid class is structured and registered outside of the core. No need to use the grid framework as is.

Like mentioned above, you can probably just extend the bootstrap 3 grid class already in the core, do the necessary changes and then register that grid framework with a different handle like "my_bootstrap3".