November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
In current version it is not possible, we might add that as a tool or similar.
For now you could write some code (e.g. in an admin tool) that does something like:
var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var propertyDefinitionRepository = ServiceLocator.Current.GetInstance<IPropertyDefinitionRepository>();
var myPageType = contentTypeRepository.Load(typeof(StandardPage));
foreach (var prop in myPageType.PropertyDefinitions)
{
var writable = prop.CreateWritableClone();
writable.ResetPropertyDefinition();
propertyDefinitionRepository.Save(writable);
}
Hi,
Thanks for the answer i ended up with writing a admin tool for resetting all properties on all pages
var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var propertyDefinitionRepository = ServiceLocator.Current.GetInstance<IPropertyDefinitionRepository>();
var myPages = contentTypeRepository.List();
foreach (var myPageType in myPages)
{
foreach (var prop in myPageType.PropertyDefinitions)
{
var writable = prop.CreateWritableClone();
writable.ResetPropertyDefinition();
propertyDefinitionRepository.Save(writable);
}
}
If you also want to make sure the ContentType (e.g. PageType) is reseted as well (now only the properties are reseted) then you could add following lines in the outer foreach loop:
var writableContentType = myPageType.CreateWritableClone() as ContentType;
writableContentType.ResetContentType();
contentTypeRepository.Save(writableContentType);
Hi,
Is it possible to "revert to default" for all properties on a pagetype without going into each property and hit the button