AI OnAI Off
Hi Adam!
Check out the class EPiServer.DataAbstraction.PageDefinition, it contains the method Delete().
You can call PageDefinition.ListDynamic() to get a list of all dynamic pagedefinitions, and then iterate upto the one you want to remove.
Hope this helps,
Johan
Many thanks for this Johan, that is exactly what I was looking for.
Code snippet:
PageDefinitionCollection allDynamicProperties = PageDefinition.ListDynamic();
foreach (PageDefinition pd in allDynamicProperties ){
if (pd.Name == propertyName)
{
pd.Delete();
break;
}
...
/\dam
Can anybody please tell me how to delete dynamic properties from the system in code?
We have a number of sites that need the DBs tidying up, and I would like to automate the process.
Many thanks,
/\dam