Symfony2 MopaBootstrapBundle is indeed a good bundle, don’t get discouraged and rip the benefits of getting it!

Screenshot 2013-10-25 18.18.54

It has been years since MopaBootstrapBundle was started by my friend Phil M aka @phiamo. At first it feel really interesting, then later as I started learning things, I found hard to use and thought that it was not worth it trying anymore because of the entangling complexities of setting it up and using it. But after a dig into it once more I realized that it was mostly because I misunderstood the usage of the bundle.

@phiamo had added two repositories, one is the MopaBootstrapSandboxBundle which is key to understand MopaBootstrapBundle. He has also added symfony-bootstrap-sandbox which is a Symfony distribution with MopaBootstrapBundle and MopaBootstrapSandboxBundle installed so you can give it a quick go. But if you already cloned and started with SE the standard distribution then no worries. Just plug MopaBoostrapSandboxBundle and it will be your guide within your project.

Usually when someone buys or pays for theming a project we are provided with those templating files and we usually plug them into an accessible route to have them handy within the pages of the project. It is the same approach with MopaBoostrapBundle thanks to the addition of the theming bundle MopaBootstrapSandboxBundle from where we can find all examples to follow.

The instructions on MopaBootstrapSandboxBundle work with some minor tweaks if you started from SE, and works 100% when you start from the bootstrap symfony2 distro.

Basically after configuring all the bundles, you extend from `layout.html.twig` or `base.html.twig` which has ready made blocks to override from. If you go to `myapp.l/app_dev.php/mopa/bootstrap` then you will land in a page with examples for how to do and change things. The pages have the demo and the code in the same page, so it is not difficult. It will tell you how to configure the options with the form builder and with twig views too. It will show you examples and options that are tuned to bootstrap 3.0 (yes it is the most important thing :P) and that will save you a ton of time.

I often heard from some of my colleagues that MopaBootstrapBundle was not good to use because of its complexity, but it was out of ignorance of how it really worked or was meant to be used that I also thought and replicated to myself the same justification for not using it. Now I know and have used it with bootstrap 3.0 and it is a charm.

Feel free to try it, hope this blog post helped.

Also if you are into Symfony2 Ecommerce check this resource

undeservedly thankful, your friend @cordoval

5 thoughts on “Symfony2 MopaBootstrapBundle is indeed a good bundle, don’t get discouraged and rip the benefits of getting it!

  1. I like this 🙂 tnx for share it, but the hardest part of the installation is the inherent LESS or SASS, then it is not clear if the ‘sandbox’ is either mandatory or optional … to me it would seem mandatory.

  2. But between MopaBootstrapBundle and braincrafted bundle, which one to choose?

    Any feedback for a benchmark between those 2 bundles?

Leave a Reply to Martin Hasoň Cancel reply

Your email address will not be published. Required fields are marked *