Twitter Bootstap Utilities for CakePHP
Pull request Compare This branch is 13 commits behind nodesagency:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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/bootstrap.min');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-buttons');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-alerts');
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-tabs');
echo $this->Html->script('/twitter_bootstrap/js/bootstrap-twipsy');

Christian Winther Kim Egede Jakobsen Andreas Kristiansen 2012