Joomla User Group Milwaukee Message Board › Swap bootstrap styles in Joomla with ease

Swap bootstrap styles in Joomla with ease

Vic D.
Milwaukee, WI
Post #: 6
I found this neat idea on one of the Joomla mailing lists. Thought i'd share:

One very nice feature I found with Joomla's implementation of Bootstrap is that by sticking to the Bootstrap defined classnames, you can get a far way to integrating with bootstrap theme developers by doing very little work. As an example, copy the protostar template and change the ini variables to give it a new name. Now replace the contents of template.css with any random theme from bootswatch -­ Change your default template to the new template. Instant and almost complete theme changes with practically 0 work. Because of the way Joomla! loads CSS and Javascript files[provided you use it's built in API's] - you can actually "upgrade" Bootstrap in Joomla by simply using a template. Place the latest bootstrap JS files in your template's javascript directory and place the bootstrap css code in the template and you will get an instant upgrade to the latest bootstrap. If class names are changed, then for the most part you can fix that by providing template overrides for the modules/components which use the old class names. Back with 3.0 the only problematic area I noticed was in the toolbar code....if you use the Bootstrap method of creating toolbar's dynamically with javascript when that code changes you will have things break. As such, I suggest instead using the method Joomla uses for creating toolbar's dynamically using PHP code on the server - if you do that you are immune to bootstrap script changes.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy