mercredi 3 décembre 2014

Fixing managed meta data navigation problem



I have the following :-



  1. SharePoint server 2013 web application.

  2. the web application contains two site collections of type enteprise wiki.

  3. i have enabled metadata navigation for the two site collection, and i enable Tree view.

  4. the result is that i got my managed metadata on the left site of my screen, as follow:-


enter image description here


5.but if i click on a term (for example Hardware) it will not filter the pages, instead the current page will reload.


i find the following link which talks about the same problem link. but i am not sure how i can add this method to my site collections:-



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);
}
}


i mean should i create a new sandbox solution, farm solution, or visual web part inside visual studio ? and how i can deploy the solution to my web application, can anyone advice on this please ?








0 commentaires:

Enregistrer un commentaire