how to register custom JavaScript file?

Topics: Core, Customizing Orchard, General
Oct 11, 2011 at 10:14 AM
Edited Oct 11, 2011 at 10:17 AM

I want to use a jQuery plugin that has several custom java script files. how can I register the JavaScript files?

I know that I must use Script.Include, but where the .js files must locate? I copied the .js files to the Theme\ThemeFactoryMachine\scripts but it did not work.

Oct 11, 2011 at 11:25 AM

Each module has a script folder, put it there

Oct 11, 2011 at 11:30 AM

I am not implementing a module. I am using TheThemeMachine them and I've put an HTMLWidget in the first page of my site. now I want to put the scripts of the mentioned jquery plugin (which is a RSS reader) in there. the jQuery plugin depends on some JavaScript files.

Oct 11, 2011 at 6:59 PM

It should work if you put the scripts folder in your theme. That is, if you have a web.config in there that allows the files to be served.