Question

What is the best way to filter a document library based on a Managed Metadata column?

When a user clicks a link in the "Current Navigation", it directs them to a Page with a Document library. I want the document library to already be filtered based on a value in the Managed Meta Data column. Say, for example, the metadata tag I want to filter is "Dinosaurs", the document library needs to show all the documents with the tag "Dinosaurs" (+ optionally all descendent metadata terms).

I know you can create a view on the document library and apply it to the document library web part, but I have many MetaData terms and this isn't an option.

Is there a way to do this via code?

Was it helpful?

Solution

What you are looking for is "Metadata Navigation".

if you go to:

  1. Library settings
  2. Metadata navigation settings
  3. Pick a field under Available Hierarchy Fields

you will get a treeview with terms and the library view will filter based on those terms

you can also have key filters

enter image description here

Source:

https://support.office.com/en-us/article/Configure-metadata-navigation-for-a-list-or-library-a8ddfcd1-a486-4e0f-b1b1-f10ca79fa9bc

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top