Try our conversational search powered by Generative AI!

Feature - SortIndex on Script- and CssResouce attribute for GadgetController


When adding resources on a gadgetController, ex:

    public class SerwGadgetTrendsController : Controller
        public ActionResult Index(Guid gadgetId)
            return View();

[CssResource("Content/MyCss.css")] [ScriptResource("Script/MyScript.js")] [Gadget]    
public class MyGadget: Controller    
        public ActionResult Index(Guid gadgetId)
        {            return View();        }

You sometimes want them to be added in a specific order. I.e a SortIndex attribute.

Nov 22, 2009 20:45

Your message looks very strange but it's a great idea nontheless. We have now added a sort index is used like this:

    [EPiServer.Shell.Web.ScriptResource("JScript1.js", SortIndex = 100)]
    [EPiServer.Shell.Web.ScriptResource("JScript2.js", SortIndex = 50)]

Dec 03, 2009 11:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.