Scenario:
Upgrade is always painful, I was working on one site which has been used from a long time and I wanted to get an idea on to what level pages has been customized pages before I try to upgrade my site definition.
Solution:
Wrote a small utility to go through all the available pages. You can use the vti_hasdefaultcontent field obtained through the Properties property of the SPFile class to determine whether a file is customized.
Code:
SPFile file = SPContext.Current.Web.RootFolder.Files["default.aspx"];Article:
bool IsCustomized = (bool)file.Properties["vti_hasdefaultcontent"];
MSDN
2 comments:
Does your post has a typo about term Ghosted?
My understanding -
Ghosted means uncustomized and they reside on file system.
UnGhosted means customized and they reside in content Database.
Is this correct?
You are right.. I corrected it
Post a Comment