Q:

How to filter a document library based on Managed Meta Data

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? 

A:

What you are looking for is "Metadata Navigation". 
if you go to:

Library settings
Metadata navigation settings
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

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

