左侧导航栏中的文档库的树状视图 [英] Tree view of Document library in left nav

查看:75
本文介绍了左侧导航栏中的文档库的树状视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在SharePoint文档库的左侧导航中以树状视图显示文件夹和文件,并且在单击文件时,它应该在框架的右侧打开文件,并且应该是可折叠的.

Hi I want to display folders and files in tree view in left navigation from SharePoint document libary and on click of file it should open the file in right side in frame, and it should be collapsable expandable.

推荐答案

You can get many links: follow below steps.

要将树形视图添加到文档库视图,请按照下列步骤操作:

To add a treeview to a document library view, follow these steps:

  1. 浏览到要添加树视图的视图.该页面必须是一个列表视图页面(即无法在默认的.aspx或home.aspx上运行).
  1. Browse to the view you want to add the treeview to. This must be a listview page (i.e. it won’t work on default .aspx or home.aspx).

在SharePoint Designer中编辑页面-然后单击高级模式".

Edit the page in SharePoint Designer — then click Advanced Mode.

将表格添加到具有一行和两列的PlaceHolderMain中,如下所示(注意: SharePoint不喜欢这些引号.您需要将它们全部更改回标准双引号

Add a table to PlaceHolderMain with one row and two columns as shown below (NOTE: " "SharePoint doesn’t like these quotes. You need to change them all back to standard double-quotes " ".):

<table style="width: 100%">
<tr valign="top">
<td width="20%">
</td>
<td>
</td>
</tr>
</table>

  • 将现有的Webpart区域(一个包含视图的区域)及其所有内容移到您刚刚添加的第二个区域.

  • Move the existing Webpart Zone (the one that contains the view) and all its content to the second you just added.

    将以下内容添加到刚添加的内容中(宽度为20%的内容).再次确保所有双引号都正确粘贴!

    Add the following to the first you just added (the one whose width is 20%). Again make sure all the double-quotes get pasted properly!

    <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>

  • Save the page, and then view it in your browser:

    See link


    这篇关于左侧导航栏中的文档库的树状视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆