Skip to content

Instantly share code, notes, and snippets.

@paulryan
Last active August 29, 2015 14:05
Show Gist options
  • Save paulryan/1b2f0a23099a103e8bd1 to your computer and use it in GitHub Desktop.
Save paulryan/1b2f0a23099a103e8bd1 to your computer and use it in GitHub Desktop.
Provision a list view as a web part declaritively
<View WebPartZoneID="wpzHeader" WebPartOrder="0" List="Lists/PromotedLinks" DefaultView="FALSE" BaseViewID="1" Hidden="TRUE">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="AllowConnect" type="bool">True</property>
<property name="ChromeType" type="chrometype">None</property>
<property name="Title" type="string">Promoted Links</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</View>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment