Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

Adding a web part to the AllItems view for a custom libary template

  Asked By: Clint    Date: Nov 06    Category: Sharepoint 2010    Views: 2113


I have created a feature that defines a custom libary template.

It includes a view as follows:

<View BaseViewID="1" Type="HTML" WebPartZoneID="Main"
SetupPath="pages\viewpage.aspx" Url="Forms/AllItems.aspx">

I have been trying to add a custom webpart to page using elements.xml as follows:

<Module Name="AllItems" RootWebOnly="True">
<File Url="Forms/AllItems.aspx" IgnoreIfAlreadyExists="True">
<AllUsersWebPart WebPartZoneID="Main" WebPartOrder="1">

This does not appear to work because the pages "Forms/AllItems.aspx" doesn't actually exist in the feature. I can only find examples that work with pages included in the feature and not view pages (I hope that makes sense). Any thoughts on what I am trying to do and how I should go about it?




No Answers Found. Be the First, To Post Answer.