/// <summary> /// Gets the IntroText for the dynamic trial listing page /// </summary> /// <returns>A string with the NoTrialsHtml from the configuration</returns> public string GetIntroText() { DynamicTrialListingConfigPattern pattern = this.Config.DynamicListingPatterns[this.GetCurrentPatternKey()]; if (!string.IsNullOrWhiteSpace(pattern.IntroText)) { return(this.ReplacePlaceholderText(pattern.IntroText)); } else { return(string.Empty); } }
/// <summary> /// Implementation of base trial listing page's InternalGetNoTrialsHtml /// </summary> /// <returns>A string with the NoTrialsHtml from the configuration</returns> protected override String InternalGetNoTrialsHtml() { DynamicTrialListingConfigPattern pattern = this.Config.DynamicListingPatterns[this.GetCurrentPatternKey()]; if (!string.IsNullOrWhiteSpace(pattern.NoTrialsHtml)) { return(this.ReplacePlaceholderText(pattern.NoTrialsHtml)); } else { return(string.Empty); } }
/// <summary> /// Sets up the page metadata based on the given pattern key using overrides /// </summary> /// <param name="patternKey"></param> private void SetupPageMetadata(string patternKey) { DynamicTrialListingConfigPattern pattern = this.Config.DynamicListingPatterns[patternKey]; string browserTitle = this.ReplacePlaceholderText(pattern.BrowserTitle); this.PageInstruction.AddFieldFilter("browser_title", (name, data) => { data.Value = browserTitle; }); string pageTitle = this.ReplacePlaceholderText(pattern.PageTitle); this.PageInstruction.AddFieldFilter("long_title", (name, data) => { data.Value = pageTitle; }); string metaDescription = this.ReplacePlaceholderText(pattern.MetaDescription); this.PageInstruction.AddFieldFilter("meta_description", (name, data) => { data.Value = metaDescription; }); //Setup the pretty url of this page, which feeds into the current URL and canonical url //TODO: When we build the magic Pretty URL mapping, we need to make sure the URL gets set here this.PageInstruction.AddUrlFilter(PageAssemblyInstructionUrls.PrettyUrl, (name, url) => { url.SetUrl(this.CurrentUrl.ToString()); }); //Setup the addthis URL since it is forced to be the raw PrettyURL field on the page. //TODO: account for paging? this.PageInstruction.AddUrlFilter("add_this_url", (name, url) => { url.SetUrl(this.CurrentUrl.ToString()); }); }