Skip to content

Instantly share code, notes, and snippets.

@kasuken
Created January 3, 2019 10:09
Show Gist options
  • Save kasuken/3407d3e4859e0cd8d95402d858b37b07 to your computer and use it in GitHub Desktop.
Save kasuken/3407d3e4859e0cd8d95402d858b37b07 to your computer and use it in GitHub Desktop.
SharePoint 2013/2016 TreeView
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<table style="width: 100%">
<tr valign="top">
<td width="20%">
<SharePoint:SPHierarchyDataSourceControl ID="docLibDataSource" runat="server" RootContextObject="List" ShowFolderChildren="True" EnableViewState="false"></SharePoint:SPHierarchyDataSourceControl>
<SharePoint:SPTreeView ID="doclibtreeview" runat="server" DataSourceID="docLibDataSource" EnableViewState="false" ExpandDepth="2" SelectedNodeStyle-CssClass="ms-tvselected"></SharePoint:SPTreeView>
</td>
<td>
<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main">
<ZoneTemplate>
<WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="True" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="main.xsl" ViewGuid="{AC5730FD-AD7E-4850-B885-10C2D9938947}" EnableOriginalValue="False" DisplayName="All Documents" ViewContentTypeId="" Default="TRUE" ListName="{B6A9B86A-CA1E-4A5D-8A6B-174E16813266}" ListId="b6a9b86a-ca1e-4a5d-8a6b-174e16813266" PageType="PAGE_DEFAULTVIEW" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="Documents" FrameType="Default" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="Main" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" TitleUrl="/Shared Documents" DetailLink="/Shared Documents" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_ac5730fd_ad7e_4850_b885_10c2d9938947" ExportMode="NonSensitiveData" __MarkupType="vsattributemarkup" __WebPartId="{AC5730FD-AD7E-4850-B885-10C2D9938947}" __AllowXSLTEditing="true" __designer:CustomXsl="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="{AC5730FD-AD7E-4850-B885-10C2D9938947}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Documents" Url="/Shared Documents/Forms/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=40" ><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>
</ZoneTemplate>
</WebPartPages:WebPartZone>
</td>
</tr>
</table>
</asp:Content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment