This project is read-only.

Including Scripts and Style Tags: Include vs. Require

Topics: Writing modules
Mar 30, 2011 at 5:52 PM
Edited Mar 30, 2011 at 7:41 PM

What are the major differences between the 2? Is require for embedded scripts, like the ones in the Orchard.jQuery module, and Include is for local content? I am basing all I know of this off of:

Mar 30, 2011 at 8:57 PM

Require is for script that has been registered. The decision to register a script should be based on whether it's likely to be reused. jQuery enters obviously this category. A local script that is specific to a page doesn't. If you think you or other people are going to be likely to reuse your script, you should consider registering it, like we did for jQuery.