title: Using sections in Editor/Display templates
body: <p>I want to keep all of my JavaScript code in one section; just before the closing <code>body</code> tag in my master layout page and just wondering the best to go about it, MVC style.</p>
  
  <p>For example, if I create a <code>DisplayTemplate\DateTime.cshtml</code> file which uses jQuery UI's DateTime Picker than I would embed the JavaScript directly into that template but then it will render mid-page.</p>
  
  <p>In my normal views I can just use <code>@section JavaScript { //js here }</code> and then <code>@RenderSection("JavaScript", false)</code> in my master layout but this doesn't seem to work in display/editor templates - any ideas?</p>