SharePoint Online: How to Enable Tree View?

Requirement: Enable the Tree view in SharePoint Online.

How to Enable Tree View in SharePoint Online?

SharePoint Online is a flexible and user-friendly platform that helps you collaborate with colleagues, store documents, and share information. The Tree View is used in the Quick Launch area to list all sub-sites, libraries, and lists within the current site collection. It provides the ability to expand any listed subsites to view the lists, libraries, and folders easier. The tree view is handy when you have a lot of files and folders to work with, and it provides a great way to navigate through lengthy SharePoint document libraries and help managing content efficiently. This blog post will show you how to activate the tree view in SharePoint Online.

Please note, Tree View is supported only in “Classic” SharePoint Online Document Libraries! As of today, Its not available in Modern SharePoint Online Experience. You can try 3rd party products like Bamboo Tree View or Smart Navigation or develop a Treeview control using SharePoint Framework(SPFx) solution!

To enable the tree view in SharePoint Online, follow these steps:

  1. Navigate to the SharePoint site in the browser that you want to enable the tree view >> From the SharePoint Online home page, Click on Settings and choose Site Settings from the menu.
  2. On the Site Settings page, click on “Navigation Elements” under the “Look and Feel” section. (URL Shortcut: /_layouts/navoptions.aspx)
  3. In the “Enable Tree View” section, check the “Enable Tree View” option to enable the tree view.sharepoint online enable tree view
  4. Click on OK to save your changes.

Enabling the Tree view is a simple way to make navigating large lists and libraries much easier. Tree view allows you to expand and collapse items in the list or library, so you can quickly find the item you’re looking for. You’ll be able to expand and collapse items using the “Expand” and “Collapse” symbols on each item. Here is what the document library tree view looks like on the SharePoint Online site.

tree view in sharepoint online

Make sure your library’s list experience is set to “Classic” under Library settings >> Advanced Settings >> List experience. (This works for modern sites as well). We also have the Metadata navigation feature through Metadata navigation settings under the document library settings. However, this feature also works and shows site hierarchy only on classic experience.

PowerShell to Enable Tree View in SharePoint Online

By default, SharePoint lists and libraries are displayed in flat view, which can be tedious to scroll through if there are a lot of items. Let’s enable Tree view using PowerShell:

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/Retail"

Try {
    #Connect to the Site
    Connect-PnPOnline -Url $SiteURL -Interactive

    #Get the Web
    $Web = Get-PnPWeb -Includes TreeViewEnabled

    #Enable Tree View
    $Web.TreeViewEnabled = $True
    $Web.Update()
    Invoke-PnPQuery
    Write-Host "Enabled the Tree View!" -f Green
}
Catch {
    Write-host "Error:"$_.Exception.Message
}

Now, refresh the page, and you should see the tree view below the Quick Launch on the SharePoint Online site.

And there you have it – with just a few configuration steps, SharePoint site administrators can enable the treeview feature for site navigation. This useful interface option improves information architecture through clear content hierarchy and easy collapse/expand of folders.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “SharePoint Online: How to Enable Tree View?

  • Is there a way to export my site tree view onto an Excel document or another external file?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *