Property bags are incredibly useful creatures. Basically, property bags allow you to set custom properties on elements that do not otherwise support custom metadata, such as lists and web sites.
The problem, however, is that there is no way through the web interface to set such properties and you need to write custom code to add such custom properties in SharePoint today. Even though some object types support setting properties when you deploy them, there's no way outside of custom code to set properties after an object has been created.
In SharePoint 2010, that's changing, with a new feature element called, descriptive enough, property. You can now deploy custom properties to object using feature element code such as this:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <PropertyBag ParentType="Web" Url="http://lab-03:2000/"> <Property Name="customkey" Value="customvalue"/> </PropertyBag> </Elements>
I haven't been able to test whether you can update existing properties in this manner, or if and how you can delete custom properties if set.
.b





0 comments:
Post a Comment