BlogEngine.Core.Web.Scripting.Helpers.AddBundledStylesAndScripts C# (CSharp) Method

AddBundledStylesAndScripts() public static method

Add bundles created by web.optimization
public static AddBundledStylesAndScripts ( System page ) : void
page System Base page
return void
        public static void AddBundledStylesAndScripts(System.Web.UI.Page page)
        {
            var resourcePath = HttpHandlers.ResourceHandler.GetScriptPath(new CultureInfo(BlogSettings.Instance.Language));

            if (Security.IsAuthenticated)
            {
                AddStyle(page, string.Format("{0}Styles/cssauth", Utils.ApplicationRelativeWebRoot));

                AddScript(page, resourcePath);
                AddScript(page, string.Format("{0}Scripts/Header/js", Utils.ApplicationRelativeWebRoot), true, false, false);
                AddScript(page, string.Format("{0}Scripts/jsauth", Utils.ApplicationRelativeWebRoot), true, true, true);
            }
            else
            {
                AddStyle(page, string.Format("{0}Styles/css", Utils.ApplicationRelativeWebRoot));

                AddScript(page, resourcePath);
                AddScript(page, string.Format("{0}Scripts/Header/js", Utils.ApplicationRelativeWebRoot), true, false, false);
                AddScript(page, string.Format("{0}Scripts/js", Utils.ApplicationRelativeWebRoot), true, true, true);
            }
        }