none
In Designer sharepoint 2013,edited site page data copied to webpart.but webpart not showed the content? RRS feed

  • Question

  • Code in site page edited:

    Added listviews to the page and edited this in share point 2013 designer.

    Code:

    Placeholder main inside code:

        

    <table id="layoutsTable" style="width:100%;">
    <tbody>
    <tr style="vertical-align:top;">
    <td colspan="2">
    <div class="ms-rte-layoutszone-outer" style="width:100%;">

    <div class="ms-rte-layoutszone-inner"><div class="row">

    <div class="col-md-4 .col-xs-8">
    <div class="ms-rte-layoutszone-outer">
    <div class="ms-rte-layoutszone-inner">
    <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" ViewGuid="{724F681E-CFB8-4BC3-816D-55639E8FD3C5}" EnableOriginalValue="False" ViewContentTypeId="" ListName="{23679E59-9041-46C8-89B8-69EC6F5404F1}" ListId="23679e59-9041-46c8-89b8-69ec6f5404f1" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="True" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="My Requests" FrameType="TitleBarOnly" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="wpz" PartOrder="1" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" CatalogIconImageUrl="/_layouts/15/images/itgen.png?rev=44" TitleUrl="/sites/0108A4/Lists/Document Approval Request" DetailLink="/sites/0108A4/Lists/Document Approval Request" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="/_layouts/15/images/itgen.png?rev=44" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_92025958_3a0c_4339_b0ae_8941765db889" ChromeType="TitleOnly" ExportMode="NonSensitiveData" __MarkupType="vsattributemarkup" __WebPartId="{724F681E-CFB8-4BC3-816D-55639E8FD3C5}" __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,noXinviewofY_LIST)" /><ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" /></ParameterBindings>
    <DataFields>
    </DataFields>
    <XmlDefinition>
    <View Name="{724F681E-CFB8-4BC3-816D-55639E8FD3C5}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="" Url="/sites/0108A4/SitePages/Test_Mobile.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=44" ><Query><OrderBy><FieldRef Name="ID" Ascending="FALSE"/></OrderBy><Where><Eq><FieldRef Name="Author"/><Value Type="Integer"><UserID Type="Integer"/></Value></Eq></Where></Query><ViewFields><FieldRef Name="LinkTitle"/><FieldRef Name="DocumentType"/><FieldRef Name="ApprovalStatus"/></ViewFields><RowLimit Paged="TRUE">5</RowLimit><Aggregations Value="Off"/><JSLink>clienttemplates.js</JSLink><XslLink Default="TRUE">main.xsl</XslLink><Toolbar Type="None"/></View></XmlDefinition>
    </WebPartPages:XsltListViewWebPart>
    <br></div></div></div>

     </td></tr></tbody></table>

    After copy this code to content editor webpart,it  displayed as 5clienttemplates.jsmain.xsl 

    some times blank page is showed.

    I edited this in designer 2013 because i have to apply custom css to my list view for PC and mobile(<div class="col-md-4 .col-xs-8">).

    Please help me how to see my listview content?

    Provide the solution to work in this code in webpart.


    Thursday, May 4, 2017 4:30 PM

All replies

  • Hi sudhir,

    Why do you copy the code to the site page in SharePoint Designer.

    In actually, we can create a new site page, then edit the list view though “Insert->Data View->lists/document libraries”.

    Then add Content Editor Web part though “Insert->Web part->Media and Content->content editor”.

    To apply custom css, we can save this css file to site asset library and select the content editor web part->right click-> tag property->type css file URL.

    Please use this method and check if the issue exists.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, May 5, 2017 9:50 AM
    Moderator
  • I have 4 list views in single page.each view shows 5 items at a a time.

    and this view is for mobile as well as pc.

    so i have to validate this in both cases.

    In mobile we have to show 2 list view in each row.

    where as In PC 2 list views per row.

    Nw can you help ?


    Friday, May 5, 2017 1:47 PM