public static HtmlHelper RequiresThemedCssFolder(this HtmlHelper html, IMasterModel model) { return(html.RequiresFolder(PathHelper.GetThemePath(model) + "Assets/css", 100, "*.css", (absPath, pri) => html.RequiresCss(absPath, pri))); //TODO: As per below, when latest CDF is releaesd and bundled we don't have to do this //return html.RequiresCssFolder(PathHelper.GetThemePath(model) + "Assets/css"); }
public static HtmlHelper RequiresThemedJsFolder(this HtmlHelper html, IMasterModel model) { return(html.RequiresJsFolder(PathHelper.GetThemePath(model) + "Assets/js")); }
public static HtmlHelper RequiresThemedJs(this HtmlHelper html, IMasterModel model, string filePath) { return(html.RequiresJs(PathHelper.GetThemePath(model) + "Assets/js" + filePath.EnsureStartsWith('/'))); }
/// <summary> /// Returns the url of a themed asset /// </summary> /// <param name="url"></param> /// <param name="model"></param> /// <param name="relativeAssetPath"></param> /// <returns></returns> public static string ThemedAsset(this UrlHelper url, IMasterModel model, string relativeAssetPath) { return(VirtualPathUtility.ToAbsolute(PathHelper.GetThemePath(model)).EnsureEndsWith('/') + "assets/" + relativeAssetPath); }