Question

I have created a Grails project. And now i want to use twitter-bootstrap. I have installed bootstrap successfully. But i want to know how to reference the following 3 links in the index.html page

<r:require modules="bootstrap" />
<r:layoutResources />
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
    href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet"
    href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script
    src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
Was it helpful?

Solution

If you have the bootstrap plugin installed you just need to call the required module

BuidConfig.groovy

compile ":twitter-bootstrap:2.3.2"

Then in your GSP

<r:require modules='bootstrap-css, bootstrap-js, bootstrap-modal, ...'/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top