public ActionResult Create() { var site = new Site(); site.UrlsJson = System.Web.Helpers.Json.Encode(new List<SiteUrl> { new SiteUrl() }); return View(site); }
public static void SetPreview(Site site, Page page) { site.MatchedUrl = new SiteUrl(); FrontContext.Current = new FrontContext { Site = site, Page = page, IsPreviewMode = true }; }
public ActionResult Create(Site model) { if (ModelState.IsValid) { try { var service = new SiteService(DataContext); service.CreateSite(model); ShowSuccess(MessageResource.CreateSuccess); return RedirectToIndex(); } catch (Exception e) { LogError(e.ToString()); ShowError(MessageResource.CreateFailed); } } return View(model); }
public ThemeService(Site site) { _site = site; }
public WidgetService(Site site) { _site = site; }