Include custom javascript or css file for single page

Topics: General
May 4, 2011 at 9:31 PM

What is the best practices way of including scripts in the<header> element of a single page?  I see the "Scripting" and "LightweightScripting" modules in the Modules section, but no docs on how to use these.  Editing a cshtml file for single page seems a bit ugly, although it may be the only way to do this.


What is the best way to include a .js file for a single page?



Aris Green

May 5, 2011 at 11:44 PM

I found it useful to have a zone in the <head> tag of my theme for things like this.  Then you can juse add an HTML Widget in the zone, create a layer so it only affects the page(s) you'd like and you can add additional <meta> <script> or <link> tags.