See how Microsoft Consulting Services can help you
Contact Microsoft Services
Contact The SharePoint Guys
Apply for a job at Microsoft Consulting Services
MCS Solution Dev
The Deployment Guys
MSDN UK
MSDN UK Newsletter
MSDN UK Team Blog
TechNet UK
TechNet UK Newsletter
TechNet UK Blog
When deploying a page to SharePoint through a Modules feature, there are several options adding web parts to this. These are as follows:
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="XYZCustomPages" RootWebOnly="True"> <File Path="XYZCustomPages\Home.aspx" Url="Home.aspx" IgnoreIfAlreadyExists="true"> <AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1"> <![CDATA[ <?xml version="1.0" encoding="utf-8"?> <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type name="SolutionX.ProjectY.WebParts.MyWebPart, $SharePoint.Project.AssemblyFullName$" /> <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage> </metaData> <data> <properties> <property name="Title" type="string">My WebPart</property> <property name="Description" type="string">My WebPart for XYZ</property> <property name="ListName" type="string">ExampleList</property> <property name="RowLimit" type="string">5</property> </properties> </data> </webPart> </webParts> ]]> </AllUsersWebPart> </File> </Module></Elements> Cheers to Pete Mellish and Amardeep Bhogal, who i kicked around the pro's and con's with. Rob Nowik
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="XYZCustomPages" RootWebOnly="True"> <File Path="XYZCustomPages\Home.aspx" Url="Home.aspx" IgnoreIfAlreadyExists="true"> <AllUsersWebPart WebPartZoneID="Left" WebPartOrder="1"> <![CDATA[ <?xml version="1.0" encoding="utf-8"?> <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type name="SolutionX.ProjectY.WebParts.MyWebPart, $SharePoint.Project.AssemblyFullName$" /> <importErrorMessage>$Resources:core,ImportErrorMessage;</importErrorMessage> </metaData> <data> <properties> <property name="Title" type="string">My WebPart</property> <property name="Description" type="string">My WebPart for XYZ</property> <property name="ListName" type="string">ExampleList</property> <property name="RowLimit" type="string">5</property> </properties> </data> </webPart> </webParts> ]]> </AllUsersWebPart> </File> </Module></Elements>
Cheers to Pete Mellish and Amardeep Bhogal, who i kicked around the pro's and con's with.
Senior Consultant
Microsoft Consulting Services UK
Click here to read my bio