Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
// extend PageType EPiServer.DataAbstraction.PageType _pageType = EPiServer.DataAbstraction.PageType.Load(currentPage.PageTypeID); EPiServer.DataAbstraction.PageDefinition _propDef = new PageDefinition(); _propDef.PageTypeID = currentPage.PageTypeID; _propDef.Name = FOLDER_REF_PROP_NAME + i.ToString(); _propDef.EditCaption = FOLDER_REF_PROP_NAME + i.ToString(); _propDef.HelpText = "some help msg ..."; _propDef.DefaultValueType = EPiServer.DataAbstraction.DefaultValueType.None; _propDef.DefaultValue = ""; _propDef.Type = EPiServer.DataAbstraction.PageDefinitionType.Load(4); // 4 = PageReference _propDef.ID = 0; // 0 to create new _propDef.Searchable = false; _propDef.Tab = EPiServer.DataAbstraction.TabDefinition.Load("my tab caption"); try { _propDef.Save(); _pageType.Definitions.Add(_propDef); _pageType.Save(); EPiServer.DataAbstraction.PageType.ClearCache(); } catch (Exception eExp) { // propably property already exists - OK string message = eExp.Message; } currentPage.Property.Add(FOLDER_REF_PROP_NAME + i.ToString(), new PropertyPageReference(new PageReference(_pageId)));