Submitted by admin on Mon, 09/16/2019 - 15:13

Bootstrap is winning the web.

Nearly 10% of all websites now use the Bootstrap framework.

That's reflected on Drupal.org, where Bootstrap is the third most popular theme. Bootstrap is a base theme that integrates Bootstrap 3 with Drupal.

Here's a guide to getting started with the Bootstrap theme.

Getting Started with the Bootstrap theme

First things, first, go and download, install and enable the Bootstrap theme.
 

Image removed.

After enabling the theme you may see a message like this:

jQuery Update is not enabled, Bootstrap requires a minimum jQuery version of 1.7 or higher.
Please enable jQuery Update module 7.x-2.3 or higher, you must manually set this in the configuration after it is installed.

If you see that message, you will need to install the jQuery Update module too.

Once you have the correct version of jQuery, your theme will look like this:
 

Image removed.

By default, the Bootstrap theme start with a 12-column grid and three unequal columns. The two sidebars each use 3 columns and the main content column uses 6 columns. The Bootstrap framework itself has really good documentation, including this page on grids.

 

Image removed.

Bootstrap Module Layouts

As with many Drupal base themes, you will need extra modules to provide Bootstrap compatible layouts.

The Bootstrap theme documentation has an overview of the modules available.

For example, if you install the Views Bootstrap module, you will see these options inside Views:

 

Image removed.

There are some Panels Bootstrap Layouts available:

Image removed.

You can also get some Display Suite Bootstrap Layouts:

Image removed.

Bootstrap Sub-theming

The Bootstrap theme comes with a ready-to-use subtheme folder called "bootstrap_subtheme",

Image removed.

All you need to do is the rename one file. Take ".starterkit" from the end of the file name to leave bootstrap_subtheme.info.

 

Image removed.

Once that is set up, there are ways to continue working on your subtheme.

The easiest method (which Bootstrap) calls Method 1, is simply to open /bootstrap_subtheme/css/style.css. You'll see this comment below. You can delete that comment and start adding your own CSS.

The alternate, and far more involved approach, called Method 2, is described here.

 

Image removed.

If you've done the following step correctly, the Bootstrap sub-theme will appear in your admin area.

Image removed.
Solutions Img