PHPackages                             itlized/mopa-bootstrap-bundle - 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. [Templating &amp; Views](/categories/templating)
4. /
5. itlized/mopa-bootstrap-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

itlized/mopa-bootstrap-bundle
=============================

Easy integration of twitters bootstrap into symfony2

v2.2.0(12y ago)032MITCSS

Since Nov 27Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ITLized/MopaBootstrapBundle)[ Packagist](https://packagist.org/packages/itlized/mopa-bootstrap-bundle)[ RSS](/packages/itlized-mopa-bootstrap-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (14)Used By (0)

MopaBootstrapBundle
===================

[](#mopabootstrapbundle)

MopaBootstrapBundle is a collection of code to integrate twitter's bootstrap () as easy as possible into your symfony2 () Project.

The Bootstrap 3 support is now mainly working. Check out the [Beta-3](https://github.com/phiamo/MopaBootstrapBundle/releases/tag/v3.0.0-beta3)

To use MopaBootstrapBundle and twitters Bootstrap 3 in your project add it via [composer](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/1-installation.md)

NOTICE:
-------

[](#notice)

Recent BC breaks:

- dc4fd12: \[BC Break\] Removed inline completely
- add75e9: Renamed config mopa\_bootstrap.navbar to mopa\_bootstrap.menu

BS3 (master branch of this bundle) is nearly stable see [Beta-3](https://github.com/phiamo/MopaBootstrapBundle/releases/tag/v3.0.0-beta3)BS2 (v2.3.x) is quite stable

BC breaking changes will probably not be ported to 2.3.

Branches
--------

[](#branches)

To use this bundle with bootstrap 3 use the master branch:

```
{
    "require": {
        "mopa/bootstrap-bundle": "v3.0.0-beta3",
        "twbs/bootstrap": "v3.0.0"
    }
}
```

For bootstrap 2 use the v2.3.x branch:

```
If you want to use bootstrap 2:

{
    "require": {
        "mopa/bootstrap-bundle": "2.3.x-dev",
        "twbs/bootstrap": "v2.3.2"
    }
}
```

To understand which versions are currently required have a look into `BRANCHES.md`

Documentation
-------------

[](#documentation)

The bulk of the documentation is stored in the `Resources/doc/index.md` file in this bundle In any case, if something is not working as expected after a update:

- [READ the CHANGELOG!](https://github.com/phiamo/MopaBootstrapBundle/blob/master/CHANGELOG.md)

Recent BackwardsCompatibility breaking changes:

- c892cd9: Changed the way how navbars are created, read the [doc](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/4-navbar-generation.md)
- a4b78d5: Added Version Detection for BS2 or BS3
- 5f1200f: Changed the widget\_addon form parameter to use type (prepend/append) instead of append (true/false)

Live Show
---------

[](#live-show)

To see the bundle, its capabilities and some more doc just have a look on

[MopaBootstrapBundle Live](http://bootstrap.mohrenweiserpartner.de/mopa/bootstrap)

Additional Resources:

- [MopaBootstrapSandboxBundle](http://github.com/phiamo/MopaBootstrapSandboxBundle) - Seperate live docs from code
- [symfony-bootstrap](https://github.com/phiamo/symfony-bootstrap) is also available

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

[](#installation)

Installation instructions are located in the

- [master documentation](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/1-installation.md)

Included Features
-----------------

[](#included-features)

- Bootstrap Version detection via Composer Brigde
- Twig Extensions and templates for use with symfony2 Form component
    - control your form either via the form builder or the template engine
    - control nearly every bootstrap2 form feature
    - javascript and twig blocks for dynamic collections
- A generic Navbar class to generate your Navbar outside the template
    - helpers for dropdowns, seperators, etc.
- A generic Tab class to Manage bootstrap tabbing
- twig templates for KnpPaginatorBundle ()
- twig templates for CraueFormFlowBundle ()
- twig template for KnpMenuBundle ()
    - icon support on menu links

Recently added Features
-----------------------

[](#recently-added-features)

#### Tabs

[](#tabs)

We need to add more info here #### Bootstrap 3

[](#bootstrap-3)

We now officially suport bootstrap3 in our master branch, The default is to determine Version by composer, this means, MopaBootstrapBundle tries to determine which version you have installed, and configures itself to use it. This is done in a compiler pass and stored in local cache. If for any reason this does not wor for you, you might want to set the

We have several files seperated for bs2 and bs3 to be abled to support both e.g. forms:

- [https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/views/Form/fields\_bs\_2.html.twig](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/views/Form/fields_bs_2.html.twig)
- [https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/views/Form/fields\_bs\_3.html.twig](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/views/Form/fields_bs_3.html.twig)or JS:
-
-

The bs3 feature set is not yet complete, but we hope that it gets soon, with your help! E.g Form have some known issues, JS Collections, etc

#### Dynamic SubnavBars

[](#dynamic-subnavbars)

To kick start your Navigation, the Navbar component got some face lift. It got even easier to integrate also the dynamic sub navbar you might have seen in the twitter bootstrap docs.

To learn how to use this features read [Navbar docs (4-navbar-generation)](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/4-navbar-generation.md).

Also have a look into the [Sandbox](http://bootstrap.mohrenweiserpartner.de/mopa/bootstrap/navbar)

#### initializr

[](#initializr)

To make your base HTML5 even better and let you use good practices we added to this bundle features from [HTML5 BoilerPlate Project](http://html5boilerplate.com/). Integration was done using setup pregenerated with support of [Initializr](http://www.initializr.com/). Actually we support **HTML5** **BoilerPlate** *v3.0.3* with **Modernizr** *v2.5.3* and **Respond**.

To learn how to use this features read [Initializr docs (50-Initializr.md)](https://github.com/phiamo/MopaBootstrapBundle/blob/master/Resources/doc/50-initializr.md).

Warning
-------

[](#warning)

> The branching strategy has been adapted to be more flexible:
>
> - The old branch for bootstrap 1.x (v1.x) still exists.
> - The v2.0.x (previously v2.x\_sf2.0) branch is following Symfony 2.0.x with bootstrap 2.x
> - The master branch is following Symfony master with bootstrap 2.x
> - The master-crud branch is following Symfony master with bootstrap 2.x but still has the CRUD Generator, which depends on SensioGeneratorBundle

Translations
------------

[](#translations)

If you use [KnpPaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle) with MopaBootstrapBundle, you can translate labels to your language. To do this add new file

```
Resources/translations/pagination.[YOUR LOCALE CODE].yml
```

As example you have there Polish translation.

Contribute
----------

[](#contribute)

If you want to contribute your code to MopaBootstrapBundle please be sure that your PR's are valid to Symfony2.1 Coding Standards. You can automatically fix your code for that with [PHP-CS-Fixer](http://cs.sensiolabs.org) tool.

You can see who already contributed to this project on [Contributors](https://github.com/phiamo/MopaBootstrapBundle/contributors) page

License
-------

[](#license)

This bundle is under the MIT license. For more information, see the complete [LICENCE](LICENCE) file in the bundle.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 74.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Recently: every ~11 days

Total

12

Last Release

4551d ago

Major Versions

0.5 → 1.x-dev2012-02-06

1.x-dev → 2.0.x-dev2013-02-01

v2.2.0 → v3.0.0-beta12013-10-14

2.2.x-dev → v3.0.0-beta32013-10-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/40b93f5ed56affca31d375b6278b86d5ab50a43951fcf608203058f405c4a829?d=identicon)[itlized](/maintainers/itlized)

---

Top Contributors

[![phiamo](https://avatars.githubusercontent.com/u/207291?v=4)](https://github.com/phiamo "phiamo (774 commits)")[![nysander](https://avatars.githubusercontent.com/u/753327?v=4)](https://github.com/nysander "nysander (38 commits)")[![isometriks](https://avatars.githubusercontent.com/u/1325995?v=4)](https://github.com/isometriks "isometriks (36 commits)")[![bierdok](https://avatars.githubusercontent.com/u/2333728?v=4)](https://github.com/bierdok "bierdok (18 commits)")[![peterrehm](https://avatars.githubusercontent.com/u/2010989?v=4)](https://github.com/peterrehm "peterrehm (16 commits)")[![piotrantosik](https://avatars.githubusercontent.com/u/154553?v=4)](https://github.com/piotrantosik "piotrantosik (12 commits)")[![havvg](https://avatars.githubusercontent.com/u/126898?v=4)](https://github.com/havvg "havvg (12 commits)")[![peshi](https://avatars.githubusercontent.com/u/782150?v=4)](https://github.com/peshi "peshi (10 commits)")[![chrisjohnson00](https://avatars.githubusercontent.com/u/1231933?v=4)](https://github.com/chrisjohnson00 "chrisjohnson00 (9 commits)")[![ptbello](https://avatars.githubusercontent.com/u/630963?v=4)](https://github.com/ptbello "ptbello (9 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (8 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (8 commits)")[![leonex-cs1](https://avatars.githubusercontent.com/u/10447971?v=4)](https://github.com/leonex-cs1 "leonex-cs1 (7 commits)")[![stevelacey](https://avatars.githubusercontent.com/u/289531?v=4)](https://github.com/stevelacey "stevelacey (6 commits)")[![Pentium133](https://avatars.githubusercontent.com/u/373158?v=4)](https://github.com/Pentium133 "Pentium133 (6 commits)")[![rdohms](https://avatars.githubusercontent.com/u/94331?v=4)](https://github.com/rdohms "rdohms (6 commits)")[![nervo](https://avatars.githubusercontent.com/u/95935?v=4)](https://github.com/nervo "nervo (5 commits)")[![lunetics](https://avatars.githubusercontent.com/u/149752?v=4)](https://github.com/lunetics "lunetics (5 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (5 commits)")[![pmartelletti](https://avatars.githubusercontent.com/u/557390?v=4)](https://github.com/pmartelletti "pmartelletti (5 commits)")

---

Tags

templatebootstrapformextra formbootstrap form

### Embed Badge

![Health badge](/badges/itlized-mopa-bootstrap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/itlized-mopa-bootstrap-bundle/health.svg)](https://phpackages.com/packages/itlized-mopa-bootstrap-bundle)
```

###  Alternatives

[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)[zfbase/zend1-bootstrap3

Twitter Bootstrap v.3 Forms for Zend Framework v.1

1455.7k2](/packages/zfbase-zend1-bootstrap3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
