Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Twitter Bootstap Utilities for CakePHP
JavaScript PHP
Latest commit 29920e8 @kimegede kimegede Merge pull request #15 from radig/master
Thanks :)

CakePHP 2.x plugin for Twitter Bootstrap 2.0 Compatible output


View Helpers for CakePHP to use the correct class' for TwitterBootstrap
Have submodule to TwitterBootstrap itself

You can either include bootstrap.min.js in order to get support for all twitter bootstrap JS feature,
or you can include each module as you wish to use. See below.


  • Rememer to load the plugin in app/Config/bootstrap.php
    // Load TwitterBootstrap plugin, without loading bootstrap
    CakePlugin::load('TwitterBootstrap', array('bootstrap' => false));
  • 'Form' helper need to be changed to 'BootstrapForm' helper
  • 'Paginator' helper need to be changed to 'BootstrapPaginator' helper
    // Change default Form & Paginator
    public $helpers = array(
        'Form'      => array('className' => 'TwitterBootstrap.BootstrapForm'),
        'Paginator' => array('className' => 'TwitterBootstrap.BootstrapPaginator'),

Using Crud plugin aswell? Add this to $helpers 'Js' => array('className' => 'Crud.CrudJs', 'Jquery')

Usage ex.

In your default.ctp

echo $this->Html->css('/twitter_bootstrap/css/bootstrap.min.css');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-button');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-alert');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-dropdown');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-modal');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-popover');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-scrollspy');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-tab');

Christian Winther Kim Egede Jakobsen Andreas Kristiansen 2012

Something went wrong with that request. Please try again.