2

I have created a custom wiki page layout which is almost perfect, however, I want to add a Document (Shared Document) web part to the page layout and allow the user to change the view of it when they create the page.

I have added the HTML code for the web part which displays the web part but it isn't editable? I have tried inserting it into a WebPartZone but this didn't show the web part, just a zone for the user to use.

enter image description here

  1. The top box is a standard content box which I have manually inserted the 'Documents' WebPart and I get the drop down on the right which allows the user to edit it and change the view (what I want)

  2. Is the 'Documents' WebPart that I have added to the Page Layout, which doesn't have the drop down on the right which allows the user to edit and change the view (what is happening and I don't want)

Here is the ASP code from the Page Layout.

        <h1>Documents</h1>

        <WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="False" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="main.xsl" NoDefaultStyle="" ViewGuid="{09FBDF44-4990-45DB-BF80-23FA43ACEF04}" EnableOriginalValue="False" ViewContentTypeId="" ListUrl="" ListDisplayName="" ListName="{FE695577-E884-4A46-8B93-7D1DCB93BE4D}" ListId="fe695577-e884-4a46-8b93-7d1dcb93be4d" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="Documents" FrameType="Default" SuppressWebPartChrome="False" Description="This system library was created by the Publishing feature to store documents that are used on pages in this site." IsIncluded="True" ZoneID="wpz" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" CatalogIconImageUrl="/_layouts/15/images/itdl.png?rev=44" TitleUrl="/sites/ITIS-Wiki/Documents" DetailLink="/sites/ITIS-Wiki/Documents" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="/_layouts/15/images/itdl.png?rev=44" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_4ce4a5d5_e5af_44d2_93e4_c033cfbacc74" __MarkupType="vsattributemarkup" __WebPartId="{09FBDF44-4990-45DB-BF80-23FA43ACEF04}" __AllowXSLTEditing="true" __designer:CustomXsl="Fldtypes_mswhTitle.xsl;fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><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>
        <DataFields>
        </DataFields>
        <XmlDefinition>
        <View Name="{09FBDF44-4990-45DB-BF80-23FA43ACEF04}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="" Url="/sites/ITIS-Wiki/SitePages/test.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=44" ><Query><OrderBy><FieldRef Name="FileLeafRef"/></OrderBy></Query><ViewFields><FieldRef Name="DocIcon"/><FieldRef Name="LinkFilename"/><FieldRef Name="Modified"/><FieldRef Name="Editor"/></ViewFields><RowLimit Paged="TRUE">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default="TRUE">main.xsl</XslLink><Toolbar Type="Standard"/></View></XmlDefinition>
        </WebPartPages:XsltListViewWebPart> 

        <h1>Support</h1>
        <PublishingWebControls:RichHtmlField FieldName="e92a70e3-1ac3-42a7-b5ce-86c8ccdedc4a" runat="server"></PublishingWebControls:RichHtmlField>

How can I make it editable?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.