private void InitTitle() { if (ie.CurrentItem.ID == 0) { ItemDefinition definition = Definitions.GetDefinition(ie.CurrentItemType); string definitionTitle = GetGlobalResourceString("Definitions", definition.Discriminator + ".Title") ?? definition.Title; string format = GetLocalResourceString("EditPage.TitleFormat.New"); string template = Request["template"]; if (!string.IsNullOrEmpty(template)) { var info = Definitions.GetTemplate(definition.ItemType, template); definitionTitle = info.Title; } Title = string.Format(format, definitionTitle); } else { string format = GetLocalResourceString("EditPage.TitleFormat.Update"); Title = string.Format(format, ie.CurrentItem.Title); } }
private TemplateDefinition GetTemplate(string discriminator, string templateName) { return(definitions.GetTemplate(definitions.GetDefinition(discriminator).ItemType, templateName)); }