fm-labs/cakephp-bootstrap

Twitter Bootstrap plugin for CakePHP

Installs: 152

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:cakephp-plugin

1.2.0 2023-03-21 13:50 UTC

This package is auto-updated.

Last update: 2025-01-25 16:34:09 UTC


README

Twitter Bootstrap for CakePHP

Installation

composer require fm-labs/cakephp-bootstrap

Version Info

Usage

First, load and enable the plugin.

// In Application' bootstrap method, add:
$this->addPlugin('Bootstrap')

Use the \Bootstrap\View\Helper\BootstrapHelper to load bootstrap assets:

In templates

// E.g. at the top of your (layout) template file:
$this->loadHelper('Bootstrap.Bootstrap');   // bootstrap 5.x (via CDN)
//$this->loadHelper('Bootstrap.Bootstrap4'); // bootstrap 4.x (via CDN)
//$this->loadHelper('Bootstrap.Bootstrap3'); // bootstrap 3.x (from plugin webroot)

Application-wide

// E.g. in your AppController

class AppController extends \Cake\Controller\Controller {

    public function initialize(){
        //...
        $this->viewBuilder()->loadHelper('Bootstrap.Bootstrap')
    }
}

View Helpers

Form Widgets