0

I want to replace the default.aspx with my own. The problem i am running into is strange. I created a module with default.aspx in it. I copy and pasted the following into the main Content

<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="Left" Title="loc:Left"><ZoneTemplate>
            <WebPartPages:XsltListViewWebPart runat="server" Description="Use this list to track upcoming events, status updates or other team news." ListDisplayName="" PartOrder="2" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="False" IsIncludedFilter="" DataSourceID="" Title="Announcements" ViewFlag="8388621" NoDefaultStyle="" AllowConnect="True" FrameState="Normal" PageSize="-1" PartImageLarge="" AsyncRefresh="False" Dir="Default" DetailLink="/Lists/Announcements" ShowWithSampleData="False" ListId="0b45f366-d973-452f-9eac-f222c59aa896" ListName="{0B45F366-D973-452F-9EAC-F222C59AA896}" FrameType="Default" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ViewGuid="{101B74E6-7B7C-47ED-9448-24AC2EE03E3A}" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" WebId="00000000-0000-0000-0000-000000000000" ViewContentTypeId="0x" InitialAsyncDataFetch="False" GhostedXslLink="main.xsl" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ListUrl="" ID="g_101b74e6_7b7c_47ed_9448_24ac2ee03e3a" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" TitleUrl="/Lists/Announcements" ManualRefresh="False" __MarkupType="vsattributemarkup" __WebPartId="{101B74E6-7B7C-47ED-9448-24AC2EE03E3A}" __AllowXSLTEditing="true" __designer:CustomXsl="fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>

             .........etc.......  </WebPartPages:XsltListViewWebPart></ZoneTemplate></WebPartPages:WebPartZone>

I then deploy it but the contents of the ZoneTemplate are missing when i go in and look at it with designer.

<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="Left" Title="loc:Left"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>

What am i doing wrong/Whats going on? Here is the Elements.xml for the module that is deploying it in case you need it

<Module Name="Pages"><File Path="Pages\default.aspx" Url="default.aspx"  IgnoreIfAlreadyExists="False"/>

1 Answer 1

1

Figured it out. Didn't realize that deployment of the webpart in default.aspx had to be done through the element.xml of the module.

This needed to be within the file element

      <View List="$Resources:core,lists_Folder;/$Resources:core,announce_Folder;" BaseViewID="0" WebPartZoneID="Left" />   

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.