// Activate definition view for given term private void ActivateDefinitionView(DictionaryTerm dataItem) { var myDataSource = new List <DictionaryTerm> { dataItem }; termDictionaryDefinitionView.Visible = true; termDictionaryDefinitionView.DataSource = myDataSource; termDictionaryDefinitionView.DataBind(); string termName = dataItem.Term; CdrID = dataItem.ID.ToString(); if (DictionaryLanguage == "es") { PageInstruction.AddFieldFilter("browser_title", (name, data) => { data.Value = "Definición de " + termName + " - Diccionario de cáncer"; }); this.Page.Title = PageInstruction.GetField("short_title"); DictionaryDefinitionHelper.SetMetaTagDescription(dataItem, DictionaryLanguage, PageInstruction); } else { PageInstruction.AddFieldFilter("browser_title", (name, data) => { data.Value = "Definition of " + termName + " - NCI Dictionary of Cancer Terms"; }); //CHANGE MADE BY CHRISTIAN RIKONG ON 12/08/2017 AT 11:47 AM DictionaryDefinitionHelper.SetMetaTagDescription(dataItem, DictionaryLanguage, PageInstruction); } PageInstruction.AddFieldFilter("meta_keywords", (name, data) => { data.Value = termName + ", definition"; }); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); fillFormattedDate(); //set the page title as the protocol title PageInstruction.AddFieldFilter("long_title", (fieldName, data) => { if (formattedDate == String.Empty) { data.Value = String.Format((PageInstruction.Language == "es" ? espanolArchiveFormat : englishArchiveFormat), (String.IsNullOrEmpty(PageInstruction.GetField("short_title")) ? data.Value : PageInstruction.GetField("short_title"))); } else { data.Value = String.Format((PageInstruction.Language == "es" ? espanolDateFormat : englishDateFormat), (String.IsNullOrEmpty(PageInstruction.GetField("short_title")) ? data.Value : PageInstruction.GetField("short_title")), formattedDate); } }); }