public virtual void AddNewPropertyDefinitionToPageType(ContentType contentType, string hashedPropertyName, string editCaption, string helpText, TabDefinition tabDefinition) { var propertyDefinition = new PropertyDefinition { ContentTypeID = contentType.ID, ID = 0, DisplayEditUI = true, EditCaption = editCaption, ExistsOnModel = false, HelpText = helpText, LanguageSpecific = true, Name = hashedPropertyName, Required = false, Searchable = false, Tab = tabDefinition, Type = _stringPropertyDefinitionType }; _propertyDefinitionRepository.Service.Save(propertyDefinition); contentType = (ContentType)contentType.CreateWritableClone(); contentType.PropertyDefinitions.Add(propertyDefinition); _contentTypeRepository.Service.Save(contentType); }