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. It provides the ability to expand any listed subsites to view the lists, libraries, and subsites contained within those subsites as well. 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. 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.

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

  1. Navigate to the site 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.
  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 how the document library tree view looks like on SharePoint Online site.

tree view in sharepoint online

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 SharePoint Online site.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience 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 *