But we can use this property-bag store custom meta-property for the file. We can manage the custom properties using below method:
- SPFile.AddProperty
- SPFile.SetProperty
- SPFile.GetProperty
SPFile.CustomizedPageStatus property determines the customization status of wiki page or page layout using below properties.
- vti_setuppath
- vti_hasdefaultcontent
Changing the UIVersion of migrated sites automatically updates the master page to appropriate UIVersion. This is possible because of the SPWeb.AllProperties. It stores the master page details related to each UIVersion.
PowerShell script to list the "vti_" properties of a file.
$web=Get-SPWeb <webSite URL >
$list=$web.Lists["Site Pages"]
foreach($item in $list.Items)
{
$item.File.Name
Write-Host "**********"
foreach($key in $item.File.Properties.Keys)
{
Write-Host $key "=" $item.File.Properties[$key]
}
Write-Host "------------------*****---------------------------"
}
PowerShell script to list "vti_" properties of web site.
$web=Get-SPWeb <webSite URL >
foreach($key in $web.AllProperties.Keys)
{
Write-Host $key "=" $web.AllProperties[$key]
}
Have a look!
No comments:
Post a Comment