Export (0) Print
Expand All

Property Bag Schema

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

An elements manifest can define a property bag for a file, folder, list item, or website.

The following is a list of the elements in the Property Bag schema.

<Elements>

   <PropertyBag>

    <Property>

The following example shows how to add a Location property and its value to the property bag of a website that represents a field office.

<PropertyBag HyperlinkBaseUrl="http://contoso.com/sites/EastEnglandSalesOffice"" Url="" ParentType="Web" RootWebOnly=TRUE" />
    <Property Name="Location" Value="London" Type="string" />
</PropertyBag>

The following example shows how to add a DaysToLive property and its value to the property bag of a list item that represents a temporary price discount. The property specifies how many days the twenty-third list item should be retained before it is deleted from the list. Note that the value of the Type attribute must be a member of the PropertyBagType enumeration. Hence, in this case it must be "int", not "integer".

<PropertyBag HyperlinkBaseUrl="http://contoso.com/sites/EastEnglandSalesOffice"" Url="Lists/CurrentDiscounts" ParentType="ListItem" ItemIndex="23"/>
    <Property Name="DaysToLive" Value="90" Type="int" />
</PropertyBag>
Show:
© 2014 Microsoft