Integrates Bootstrap 3 with Symfony 2.3+.

Installs: 104

Dependents: 0

Stars: 4

Watchers: 1

Language: PHP

v1.1.0 2014-03-30 03:38 UTC


BootstrapBundle looks to integrate Bootstrap 3 with a Symfony2 v2.4 project. The base implementation hooks into the twig system, overridding the form templates and base html container to use base Bootstrap 3 styles. The Bundle also includes jQuery 1.10.* from a CDN with a local fallback.


Add the project to your composer file.

    "require": {
        "cbc/symfony2-bootstrap": "1.1.*"

Add the Bootstrap bundle to AppKernal and include the template.

new CBC\Bundle\BootstrapBundle\BootstrapBundle()
{% extends 'BootstrapBundle::base.html.twig' %}

Defined Blocks

{% block meta %}
Contains base html tags.
{% block stylesheets %}
Contains base styles for Bootstrap bundle. Implement {{ parent() }} when overriding.
{% block title %}
Contains the page meta title.
{% block nav %}
Optional block before the content, outside of the container, but inside the wrap.
{% block body %}
Wrapper for the container.
{% block header %}
Adds a header before the content area.
{% block content %}
Base content area inside the container.
{% block footer %}
Optional block after the content, outside the container and wrap.
{% block javascripts %}
Contains base javascript for Bootstrap bundle. Implement {{ parent() }} when overridding.