public virtual ResourceEntry Include(string path, bool isThemePath = false) { ResourceEntry resourceEntry; if (isThemePath) { var virtualBasePath = VirtualBasePath.Replace("~/", string.Empty); resourceEntry = new ResourceEntry(ResourceType, string.Format("~/Themes/{0}/{1}/{2}", workContext.CurrentTheme.Id, virtualBasePath, path)); } else { resourceEntry = new ResourceEntry(ResourceType, string.Concat(VirtualBasePath, "/", path)); } resourcesManager.RegisterResource(resourceEntry); resourceEntry.Location = ResourceLocation.Head; return(resourceEntry); }
public virtual ResourceEntry Include(string path, bool isThemePath = false, int?order = null, object htmlAttributes = null) { ResourceEntry resourceEntry; if (isThemePath) { var virtualBasePath = VirtualBasePath.Replace("~/", string.Empty); resourceEntry = new ResourceEntry(ResourceType, string.Format("~/Themes/{0}/{1}/{2}", workContext.CurrentDesktopTheme, virtualBasePath, path)); } else { resourceEntry = new ResourceEntry(ResourceType, string.Concat(VirtualBasePath, "/", path)); } resourcesManager.RegisterResource(resourceEntry); if (order.HasValue) { resourceEntry.Order = order.Value; } resourceEntry.HtmlAttributes = htmlAttributes; return(resourceEntry); }