public void Initialize() { this.UpdateMembershipLookups(); this.AddMailTemplates(); RegisterDefaultTokens(); DataMapper.OnCreateMap += this.ConfigureTypeMaps; this.RegisterMappings(); PageRegistration.LocatePages(); }
public void Handle(GetContentEvent args) { var locator = PageRegistration.RegisterUrl(args.Helper, args.Options); var url = (string)args.Helper.ViewContext.RequestContext.RouteData.Values[CmsConstants.URL] ?? locator.PageUrl; url = url.ToLower(); var itemUrl = (string)args.Helper.ViewContext.RequestContext.RouteData.Values[CmsConstants.DETAILURL] ?? args.Options.Url; itemUrl = itemUrl != null?itemUrl.ToLower() : null; this.SetBasicItems(args.Helper, args.Options); locator = this.GetLocator(locator.ContentTypeName, url, itemUrl == url && args.Options.Url != null ? args.Options.Url : itemUrl); this.SetActionItems(locator, args.Helper, args.Options, url, itemUrl); var htmlAttributes = !string.IsNullOrWhiteSpace(args.Options.Url) ? new { url = args.Options.Url } : null; args.Result = args.Helper.Action(args.Options.Action, args.Options.Controller, htmlAttributes); }
public ActionResult Index() { // Register all pages that have not yet been registered before starting the search. PageRegistration.RegisterAllPages(this.ControllerContext.HttpContext, this.RouteData); return(this.View()); }