Play2.0でBootstrap2.0を使う方法を紹介します。 Play2.0ではパッケージviews.html.helper.twitterBootstrapにBootstrap用のテンプレートがあるのでこれ使えばいいじゃんと思っていたのですが、残念ながらこれはBootstrapの2.0には対応していません。見てみたら簡単に対応出来そうなので、このコードを参考に作ってみました。 Form Template Helpers と、その前に、Play2.0のテンプレートについて少し紹介します。Play2.0にはForm周りのコーディングを楽にする為のform template helpersという仕組みが提供されています。このテンプレートで入力フィールドは <input type="text" name="username" id="username" value="@user.name">
![Play 2.0でBootstrap 2.0対応 - エメラルドアオキロック](https://cdn-ak-scissors.b.st-hatena.com/image/square/95552832a07cd337955839d6e20fa78d587d8045/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fs%2Fshinobu_aoki%2F20120303%2F20120303043129.png)