CakePHP Bootstrap Theme

Bootstrap is a front-end framework and free collection of tools for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. It also provides a faster, easier, and less repetitive solution to presentation, which will no doubt appeal to any seasoned web/app developer. The main features offered by bootstrap are:

  • A fluid grid layout
  • Responsive design
  • Custom form elements
  • Typography
  • JavaScript interaction
  • Fully customizable
  • Cross-browser compatibility
The integration of CakePHP and Bootstrap is easy as there are a lot of plugin available for developer to use. In this tutorial, i' use BootstrapCake plugin which is developed by EKOInternetMarketing. This plugin allow developer to choose theme through CakePHP console during bake session.

I've already fork the plugin to my repository and ready to download. Once complete download, extract each file to proper folder in your CakePHP project. E.g:

app/Console/Templates/bootstrap -> follow the file/ folder path and paste the file from

Configure App Controller to use Bootstrap theme as shown below:

class AppController extends Controller {
public function beforeFilter(){
$this->layout = 'bootstrap';
Save! Don't forget to save!

Start the baking process using the CakePHP interactive bake shell. When baking model and view, user will be ask for template selection as shown below:

You have more than one set of templates installed. 
Please choose the template set you wish to use:
1. bootstrap
2. default
Which bake theme would you like to use? (1/2)
[1] > 1


Done! Enjoy your CakePHP project with Bootstrap theme :)
Author Information
Muhammad Asyraf bin Wahi Anuar
Web Administrator
Asyraf enjoys life and has great enthusiasm for all outdoors activities especially MTB! Don't Follow Me. I'm Lost Too -_-

Muhammad Asyraf bin Wahi Anuar | Copyright 2017 | Informatic Trooper