public ActionResult StoreThemeSelector() { if (!_themeSettings.AllowCustomerToSelectTheme) return Content(""); var model = new StoreThemeSelectorModel(); var currentTheme = _themeRegistry.Value.GetThemeManifest(_themeContext.WorkingDesktopTheme); model.CurrentStoreTheme = new StoreThemeModel() { Name = currentTheme.ThemeName, Title = currentTheme.ThemeTitle }; model.AvailableStoreThemes = _themeRegistry.Value.GetThemeManifests() //do not display themes for mobile devices .Where(x => !x.MobileTheme) .Select(x => { return new StoreThemeModel() { Name = x.ThemeName, Title = x.ThemeTitle }; }) .ToList(); return PartialView(model); }
public ActionResult StoreThemeSelected(string themeName) { _themeContext.WorkingDesktopTheme = themeName; var model = new StoreThemeSelectorModel(); var currentTheme = _themeRegistry.GetThemeManifest(_themeContext.WorkingDesktopTheme); model.CurrentStoreTheme = new StoreThemeModel() { Name = currentTheme.ThemeName, Title = currentTheme.ThemeTitle }; model.AvailableStoreThemes = _themeRegistry.GetThemeManifests() //do not display themes for mobile devices .Where(x => !x.MobileTheme) .Select(x => { return new StoreThemeModel() { Name = x.ThemeName, Title = x.ThemeTitle }; }) .ToList(); return PartialView("StoreThemeSelector", model); }