Quantcast
Channel: Craft It Online!
Viewing all articles
Browse latest Browse all 92

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

$
0
0

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 http://pilotci.com

undeservedly thankful, your friend @cordoval


Viewing all articles
Browse latest Browse all 92

Trending Articles