PHPackages                             qcubed-4/plugin-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. qcubed-4/plugin-bootstrap

ActiveQcubed-library[Utility &amp; Helpers](/categories/utility)

qcubed-4/plugin-bootstrap
=========================

QCubed-4 wrappers for Twitter Bootstrap. Specifically for QCubed v4 and above.

03PHP

Since Jul 15Pushed 10mo agoCompare

[ Source](https://github.com/qcubed-4/plugin-bootstrap)[ Packagist](https://packagist.org/packages/qcubed-4/plugin-bootstrap)[ RSS](/packages/qcubed-4-plugin-bootstrap/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

QCubed-4 Bootstrap Plugin
=========================

[](#qcubed-4-bootstrap-plugin)

QCubed-4 plugin to simplify the integration of Twitter Bootstrap

Installation
------------

[](#installation)

1. Install both the plugin and twitter bootstrap using Composer. Execute the following on the command line from your main install directory:

```
	composer require qcubed-4/plugin-bootstrap
	composer require twbs/bootstrap v3.3.7

```

2. Next, you might want to alter some of the settings in the bootstrap.cfg.php file. Look for that in /project/includes/configuration/active

### QCUBED\_BOOTSTRAP\_CSS

[](#qcubed_bootstrap_css)

The default setting for this file is:

```
	define ('QCUBED_BOOTSTRAP_CSS', QCUBED_VENDOR_URL . '/twbs/bootstrap/dist/css/bootstrap.min.css');

```

If you are compiling your own custom version of the bootstrap css file, simply set that define to point to your own version.

3. Point the base class to Bootstrap classes so that they add their functionality.

In your project/qcubed/Control/ControlBase.php file, extend from the Bootstrap Control class. For example, you should change the first line to:

```
abstract class ControlBase extends QCubed\Bootstrap\Control
{

```

### QCUBED\_BOOTSTRAP\_JS

[](#qcubed_bootstrap_js)

The default mechanism included in this plugin only loads the bootstrap.js file on forms using the plugin widgets that need it. If you are hand-coding some bootstrap forms that also need bootstrap.js, you should do both of the following to avoid multiple bootstrap.js files being loaded:

1. Define QCUBED\_BOOTSTRAP\_JS in your bootstrap.cfg.php file and point it to your desired bootstrap js file as so:

```
	define ('QCUBED_BOOTSTRAP_JS', QCUBED_VENDOR_URL . '/twbs/bootstrap/dist/js/bootstrap.js'); (or bootstrap.min.js if you prefer)

```

2. Either add this file to your footer.inc.php file like this:

```
