phiamo / MopaBootstrapBundle

Easy integration of twitters bootstrap into symfony2
http://bootstrap.mohrenweiserpartner.de
710 stars 348 forks source link

How to not include the .less css and js files from MOPA #1213

Closed pandydavey closed 7 years ago

pandydavey commented 7 years ago

Hi there,

i've just installed the MOPA bundle for Symfony 3.x and i'm having issues with horizontal form rendering. Looking at the resources that are loaded i can see that the bootstrap.css.map is always loaded, whereas before it wasnt. Am i doing something wrong? I dont want to use the .less stuff, it's a little over my head atm. so i'm keen just to keep the basic CSS and not have to less it.

I hope this had made sense ...

isometriks commented 7 years ago

Are you using one of the base templates provided here? If you're not extending the LESS base template then the assets won't end up on your page automatically. If you extend just the base.html.twig from this project then it won't include any assets. You could just include bootstrap from CDN as well:

{% stylesheets 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' %}
    ....
{% endstylesheets %}

Which is good if you want to combine assets, but otherwise just link it directly:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />