---
title: "In Orchard cms I want to include certain .js files, where should i put them and how should i include it in my project?"  
description: "In Orchard cms I want to include certain .js files, where should i put them and how should i include it in my project?"  
author: "Mark Devid"  
published: 2013-06-06  
updated: 2013-06-06  
canonical: https://www.mindstick.com/forum/999/in-orchard-cms-i-want-to-include-certain-js-files-where-should-i-put-them-and-how-should-i-include-it-in-my-project  
category: "javascript"  
tags: ["javascript"]  
reading_time: 2 minutes  

---

# In Orchard cms I want to include certain .js files, where should i put them and how should i include it in my project?

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs),\
In Orchard [cms](https://www.mindstick.com/articles/43866/top-6-cms-for-freelancers-2019-edition) I want to include certain .js [files](https://www.mindstick.com/articles/23302/the-importance-and-advantage-of-keeping-your-important-files-on-the-cloud), where should I [put](https://answers.mindstick.com/qa/111890/can-you-explain-the-difference-between-put-and-post-http-methods) them and how should I include it in my [project](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects)? I am using "**TheThemeMachine**" as the theme of my project, so I created a folder js and clubed all the .js files require to me in this folder. [Now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) in my Layout.cshtml\
I have included in this manner my other .js files But it gives me [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing) in [console](https://www.mindstick.com/blog/210/the-console-class) that\
**mywebsite/[Themes](https://www.mindstick.com/articles/12368/why-are-html-themes-the-first-selection-of-designers)/TheThemeMachine/js/jquery-1.8.0.min.js 404 (Not Found)****\**Please help,Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

Hi Expert,\
To include script files first put you'r script in Scripts directory then simply try following\
**Script.Include("jquery-1.8.0.min.js");**\
By the way , this is not the correct way of including Jquery library in your theme. Jquery have been registered as a global resource with Orhard.jQuery module thus to include jquery try this :\
**Script.Require("jQuery");**\
this will ensure that jQuery included only once.but if you insist in putting script files in js directory then you can try this trick.\
**Script.Include("../js/yourscript.js");****\**don't forget to put a copy of web.config (one exist in Scripts directory) file in your js directory unless you'r script file will never been detected.\
edit :\
making change to ThemeMachine is not a good habit.try creating your own theme based **onThemeMachine** by orchard command line .this is the way to go :\
**codegen theme <theme-name> [/CreateProject:true|false][/IncludeInSolution:true|false][/BasedOn:<theme-name>]** for example :\
**codegen theme MyTheme /CreateProject:true /IncludeInSolution:true /BasedOn:**\
TheThemeMachine orchard command line is an exe file resides in /bin directory. this will create Scripts and Styles directory automatically.\


---

Original Source: https://www.mindstick.com/forum/999/in-orchard-cms-i-want-to-include-certain-js-files-where-should-i-put-them-and-how-should-i-include-it-in-my-project

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
