gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.03k stars 204 forks source link

Lingering small Bootstrap 2 dependency #2778

Closed pnutster closed 3 years ago

pnutster commented 3 years ago

Mucking around with Joomla 4 and an early Gantry Joomla 4 development version.

We have been using Gantry for our website development for many years. We have made some adjustments to ensure all our websites can use bootstrap 3. One issue that occurred in using Gantry is that there is an old lingering bootstrap 2 dependency in the file: /libraries/gantry5/classes/Gantry/Framework/Platform.php

public $component_wrapper = '<div class="platform-content row-fluid"><div class="span12">%s</div></div>';

In our current Joomla 3 / Gantry 5 versions we made an override for this in our template setup. No problem. However, when mucking around with Joomla 4, knowing this will ship with Bootstrap 5, just wanted to point out this little old Bootstrap 2 dependency is still lurking in the Gantry 5 - Joomla 4 dev version I got my hands on.

mahagr commented 3 years ago

You can easily fix this in your theme by (note that I was lazy and just copied the defaults):

$gantry['platform']->setModuleWrapper('<div class="platform-content">%s</div>');
$gantry['platform']->setComponentWrapper('<div class="platform-content row-fluid"><div class="span12">%s</div></div>');
mahagr commented 3 years ago

In Joomla 4, we can automatically do this, but it should work for you.

pnutster commented 3 years ago

That's great. Thanks for that insight! A much better solution than I had previously. I used to set this in twig custom overrides:

/templates/g5_hydrogen/custom/engine/twig/partials/

Talking of which, if I would want to make changes to default head code, this is still done by the method of overriding "page_head.html.twig" in /templates/g5_hydrogen/custom/engine/twig/partials/page_head.html.twig ?

pnutster commented 3 years ago

One more thing, if I wre to make changes to: /templates/g5_hydrogen/includes/theme.php Aren't these prone to be overwritten during a template / theme update?

mahagr commented 3 years ago

Yes -- if it's not your theme and the theme updates. I will need to add support for overriding that file. Can you create an issue of it?

pnutster commented 3 years ago

Done: https://github.com/gantry/gantry5/issues/2784