I want to add a Twitter Bootstrap accordion to my SilverStripe-website. I am using SS 3.0.5 on Ubuntu and the Twitter Bootstrap theme from http://www.silverstripe.org/twitter-bootstrap-theme/. What I did was:
I added the following two lines at the top of my template (.ss) file:
<% require javascript(themes/aep-bootstrap/js/bootstrap.js) %>
<% require javascript(themes/aep-bootstrap/js/bootstrap-collapse.js) %>
Then I added a new "row-fluid" and copied the sample code from http://twitter.github.io/bootstrap/javascript.html#collapse inside it:
<div class="row-fluid">
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Collapsible Group Item #1
</a>
</div>
<div id="collapseOne" class="accordion-body collapse in">
<div class="accordion-inner">
Anim pariatur cliche...
</div>
</div>
</div>
</div>
</div>
The result is that the text displays in my site, but it is not collapsible. I guess the probem is that the javascript can not be found, but the reference to it is correct and AFAIK the standard way to include javascript in SS templates.