...
- Login as an administrator
- Go to the "Template Editor" page
- Open up the "Code Editor"
- Include web optimization into the razor template
- Create a new "Script Bundle"
- Include your scripts into the bundle
- Create and load your bundle
Code Block | ||
---|---|---|
| ||
@using System.Web.Optimization; @{ var cvScripts = new ScriptBundle("~/TemplateBundles/CVScripts"); } ... Other HTML here @{ cvScripts.Include("~/Scripts/cv.util.js"); } ... Other HTML here @ { BundleTable.Bundles.Add(cvScripts); @Raw(@Model.TemplateUtil.ScriptRender("~/TemplateBundles/CVScripts")) } |
Tip |
---|
To enable this functionality the template needs to be a version 4 template |
...
Content by Label | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|