Rupali Shinde

Rupali Shinde

  • NA
  • 5.4k
  • 1.1m

Only Content controls are allowed directly in a content page

Nov 29 2015 11:49 PM
Only Content controls are allowed directly in a content page that contains Content controls. 
 
i am having my custom page layout, it is working fine with html control. now i want to add pages webpart onto this page. i created 1 view for pages library  to show only 10 latest pages.
 
when i am trying add below code onto this page via Editor and uploaded page in master page gallery i am getting error
 
please suggest me proper way to add webpart on custom page without error..
 
---------------------------
<asp:content contentplaceholderid="PlaceHolderMain2" runat="server">
<WebPartPages:XsltListViewWebPart runat="server" AllowHide="True" PartImageSmall="" PartOrder="0" Title="Pages" ManualRefresh="False" ViewGuid="{8A60CDAD-0911-4482-BE4E-C679FCC23901}" HelpMode="Modeless" AllowEdit="True" SuppressWebPartChrome="False" ShowWithSampleData="False" ListId="ee01ccaf-84fe-449f-86d3-de0746b08836" GhostedXslLink="main.xsl" PageSize="-1"
UseSQLDataSourcePaging="True" EnableOriginalValue="False" NoDefault
ConnectionID="00000000-0000-0000-0000-000000000000" ExportControlledProperties="False" AutoRefreshInterval="60"
ViewContentTypeId="0x" Description="This system library was created by the Publishing feature to store pages that are created in this site."
AllowZoneChange="True" CatalogIconImageUrl="/_layouts/images/itdl.png" ID="g_dbb91a84_0f68_4f3c_91fc_5e21b37d283a"
MissingAssembly="Cannot import this Web Part." FrameState="Normal" AllowMinimize="True" Dir="Default" ViewFlag="8388621"
AllowConnect="True" ListUrl="" DetailLink="/09/ERPCOE/sapedia/Pages" WebId="00000000-0000-0000-0000-000000000000"
PartImageLarge="/_layouts/images/itdl.png" TitleUrl="/09/ERPCOE/sapedia/Pages" ListName="{EE01CCAF-84FE-449F-86D3-DE0746B08836}"
FrameType="Default" DataSourceID="" IsIncludedFilter="" AllowRemove="True" HelpLink="" IsIncluded="True" IsVisible="True" AsyncRefresh="False"
AutoRefresh="False" ListDisplayName="" InitialAsyncDataFetch="False" __MarkupType="vsattributemarkup" __WebPartId="{8A60CDAD-0911-4482-BE4E-C679FCC23901}"
__AllowXSLTEditing="true" __designer:CustomXsl="fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><DataFields>
</DataFields>
<ParameterBindings>
<ParameterBinding Name="dvt_sortdir" Location="Postback;Connection" />
<ParameterBinding Name="dvt_sortfield" Location="Postback;Connection" />
<ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue="" />
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection" />
<ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
<ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
<ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
<ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" />
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noitemsinview_doclibrary)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noitemsinview_doclibrary_howto2)" />
</ParameterBindings>
<XmlDefinition>
<View Name="{8A60CDAD-0911-4482-BE4E-C679FCC23901}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="" Url="/09/SitePages/Test.aspx" Level="255" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/dlicon.png">
<Query>
<OrderBy>
<FieldRef Name="Created" Ascending="FALSE"/>
</OrderBy>
</Query>
<ViewFields>
<FieldRef Name="LinkFilenameNoMenu"/>
<FieldRef Name="PublishingContact"/>
<FieldRef Name="Created"/>
</ViewFields>
<RowLimit>15</RowLimit>
<Aggregations Value="Off"/>
<Toolbar Type="Freeform"/>
</View>
</XmlDefinition>
</WebPartPages:XsltListViewWebPart>
</asp:content>
 

Answers (1)