Articles


How to create a sub theme using bootstrap 7x-3.x. in Drupal 7

How to create a sub theme using bootstrap 7x-3.x. in Drupal 7



Posted bysivaprasad,7th Dec 2015

What makes this Article important is that the absence of .subtheme folder inside the newer version of bootstrap 3.

 

So lets start to make our own subtheme in bootstrap 7.x-3.1

 

Download the bootstrap 3 module and dependencies.

 

Extract and Enable the modules.

 

We can find the bootstrap folder on sites/all/themes folder.

 

Open the bootstrap folder, then we can find the starterkits folder.

 

Open the folder, there will be the CDN & LESS folder.

 

Copy the Less folder & paste it inside sites/all/themes folder.

 

Rename the folder to the subtheme name.

 

Inside the subtheme folder we can find a file named less.starterkit.

 

Rename the file to your subtheme name .info.

 

Then Compile the less file.

 

We can use Less CSS Preprocessor module.

 

Download the Bootstrap source, extract and paste it inside the subtheme folder.

 

Then include “stylesheets[all][ ] = less/style.less” in the .info fie.

 

Also comment the “stylesheets[all][ ] = css/style.css” using ; .

 

If needed also include “exclude[js][ ] = 'sites/all/themes/bootstrap/js/bootstrap.js'” also.

 

In some situations there also needed the less.php library also.

 

Download the lessphp library to sites/all/libraries folder.

 

Go to Configuration/Development/Less and enable the less engine of the corresponding Library Installed.

 

Then goto the site and enable the new subtheme.

Related Articles