Apr 3, 2011 at 6:21 PM
Edited Apr 3, 2011 at 6:21 PM
We have a number of jQuery widgets we want to use on different pages within the site (content rotators, photo display enhancements, ...)
What's the best way to include the necessary package of scripts and styles for each only on the pages that need it?
Some options we are considering:
1. Create a new page type and add the styles and scripts only when that page type is used.
2. Create a module with a widget for each package of scripts/styles, so you just add, say, the 'PrettyPhoto' widget to a page if you need it
3. Create a general purpose widget that has fields for CSS and Script references so you customize it for each layer you put it on with the references you want
4. Turn every third party jQuery widget our designer wants to use into is own Orchard widget complete with UI for setting all the values and content needs