Seems there are two main approaches if I want to be able to filter my wiki pages using metadata term store inside enterprise wiki site collection.
First Approach. Tree View Approach is to do the following:-
Enable the “Metadata Navigation and Filtering” site feature inside my site collection.
Go to “Site Setting >> Tree View >> enable tree view”
Got to “Library settings >> Metadata Navigation Settings”, configure the fields to be displayed.
The result is that I will get all the current term store fields inside a tree as follow:-
Second Approach. Managed Navigation Approach is to do the following:-
- Go to Site Setting>> Navigation.
- Chose Managed Navigation under the Global navigation,
- Chose the wiki category , from the term store.
- The result will be that I will get managed navigation at the top;
Now i am not sure which approach is the correct one to follow & what are the differences between the two approaches?
From my side I find the following differences:-
- Using tree view is more user friendly and will allow having extra columns inside the tree, this can be controlled using " Metadata Navigation Settings" under the library settings.
- While using the managed navigation , I can only chose to have one term set such as the default wiki category. And the look and feel is not very user friendly
Now as I mentioned before the idea is that I want the ability to click on a term and get all the wiki pages that have been tagged using this term. Although both solutions will not allow metadata filtering to be done out of the box, for example using tree view I have to deploy the following solution to enable this (link), otherwise clicking on any term inside the Tree view will just redirect to the home page.. while for the managed navigation I did not use this before..
public class CustomWikiPageBase : PublishingLayoutPage
{
protected override void OnInit(EventArgs e)
{
if (!String.IsNullOrEmpty(Request.QueryString["TreeField"])
&& !String.IsNullOrEmpty(Request.QueryString["TreeValue"]))
{
Response.Redirect(String.Format("{0}?TreeField={1}&TreeValue={2}",
SPContext.Current.ListItem.ParentList.DefaultViewUrl,
Request.QueryString["TreeField"],
Request.QueryString["TreeValue"]));
}
else if (!String.IsNullOrEmpty(Request.QueryString["TreeField"]))
{
Response.Redirect(String.Format("{0}?TreeField={1}",
SPContext.Current.ListItem.ParentList.DefaultViewUrl,
Request.QueryString["TreeField"]));
}
base.OnInit(e);
}
}