Phidiax Tech Blog

Adventures in custom software and technology implementation.

SharePoint Online Document List Folder Navigation Breadcrumbs Using JavaScript Display Template

When navigating SharePoint, I often find myself wondering, “Where in the Information Architecture am I?” In an effort to provide a better way of navigating SharePoint Lists and Folders, I stumbled across an interesting solution, utilizing JavaScript Display Template, but also noticed that the JavaScript Display Template seemed missing as an option.

Ultimately, we are looking for something as follows:




Below are a few steps to enable Document List Folder breadcrumb navigation on SharePoint Online.


  • Upload the FolderNavigation.js to the Master Page Gallery as a JavaScript Display Template.


  • If the JavaScript Display Template is missing, you will have to update the Master Page Gallery Library Settings. Navigate to the Library Settings.


    • On the Master Page Gallery Settings, verify the Content Types. You should see JavaScript Display Template.


    • If the JavaScript Display Template does not exist, select “Add from existing site content types.”
    • In the Settings Add Content Types, Add the JavaScript Display Template to the list, and select OK.


  • Assuming you are able to upload the FolderNavigation.js as a JavaScript Display Template, perform the following settings:


  • Now, you are able to update Document List Web Parts for your site and subsites.
    • Navigate to the Document List Web Part, Edit Web Part
    • Scroll down to Miscellaneous settings, update the JS Link field to point to your FolderNavigation.js
      • ~siteCollection/_catalogs/masterpage/FolderNavigation.js
    • Select OK



This quick adjustment has helped our team become more productive when managing media via Document Lists. I hope you will also find this useful.


-Jason Sauers



Comments (14) -

  • Jonathan

    2/8/2016 8:32:55 AM | Reply

    Works like a charm! Thanks very much.

  • Jadwiga

    8/17/2016 4:55:26 AM | Reply

    Hello! Thanks a million for the code! Is there a way to dispay root folder name instead of "Root"?

    • Jason Sauers

      10/18/2016 11:06:52 AM | Reply

      I have not tried to override the Root. If you discover how to do it, please post your solution!

  • Erik

    11/23/2016 7:27:29 AM | Reply


    Many thanks for this great Script. It looks like I got it working.
    The only issue is that I only see my Breadcrumps appearing after doing a complete page refresh. Is this intended use, or still something wrong in my implementation of the script?

    • Jason Sauers

      11/23/2016 10:05:50 AM | Reply

      Hello Erik

      This is not intended. The breadcrumbs should remain present throughout use. There may be something that must be updated in your configuration. I have not come across this before. Please share if you come to a solution.

      Thank you
      Jason Sauers

      • Erik

        11/24/2016 1:29:26 AM | Reply

        Dear Jason,

        Thanks very much for your quick reply. I have done some more testing and see a difference in behavior depending where the Web Part is displayed. When I open the Document Page directly, the Breadcrumbs appear as intended. But when I present the Document App as an inserted App at a Page with other elements (No other Document App), then the Breadcrumbs do not appear.
        Any idea what is going wrong?

        Thanks again,


  • Dave Milner

    11/25/2016 10:22:14 AM | Reply

    Erik,  the codebase and samples under  have mostly been deprecated in favor of samples under   The vast majority of sample code that is relevant to the current product is there.   The vast majority of code branches under code.msdn/office have not been touched since 2015.

    As such, it's very difficult to know whether your errors are due to configuration, or if the JavaScript is not relevant to current patches or versions of SharePoint / O365 without getting deep enough into it to upgrade it myself.  

    I would suggest contacting Sohel Rana who owns that codebase to see if he has upgraded it, or post a question in the comments on code.msdn.

  • Erik

    11/27/2016 11:42:23 PM | Reply

    OK Dave, thanks for your advice.

    Kind regards,


  • Terry

    4/7/2017 9:35:11 AM | Reply

    Will this breadcrumb workaround still function properly after an onprem to o365 migration?

    • Jason Sauers

      4/7/2017 10:00:44 AM | Reply

      Hi Terry

      Yes, should be just fine. We use it on Office 365 SharePoint Online.


  • Chris Taverner

    7/7/2017 11:26:28 PM | Reply

    Will this work for Wiki Pages in SharePoint Online (Office 365)? I want the breadcrumb navigation without editing the master pages.

  • Praveen Meripe

    10/24/2017 10:28:58 AM | Reply

    To change text "Root" to Library name, just overwrite below code in js file.

    title: useDocLibTitleAsRootFolderName ? renderCtx.ListTitle : renderCtx.ListTitle,
                        url: replaceQueryStringAndGet(document.location.href, 'RootFolder', listUrl)


Privacy Policy  |  Contact  |  Careers

2009-2017 Phidiax, LLC - All Rights Reserved