SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When URL rewriting is implemented then the left navigation is not highlighting the selected link.

Example:

Actual Link - /company/pages/home.aspx
Rewriting Link - /company/home

When using the Rewriting Link I can click on it and it will work fine but the navigation item is not selected. When using the Actual Link the navigation item is selected but clicking on it leads to "page not found" because the url rewriting is applied. Any help?

share|improve this question
    
Might it have to do with the rewritten link not having an extension that matches? – ghangas Feb 4 '13 at 18:20

SharePoint itself is unaware of the rewriting that is being applied. When it goes to see if the active page should be highlighted, the URL of the page doesn't match what SharePoint "thinks" is the URL of the page.

The only way to resolve this would be to write your own navigation control to handle this -or- use some JavaScript to setup the active link with CSS.

share|improve this answer
    
To add to this, this is why this type of URL Rewriting is not supported within SharePoint. – Trevor Seward Feb 14 '13 at 2:03

I see this is an old question, but it is the only somewhat related question that I could find to my issue, which is similar to what you describe.

I assume you are referring to when using Managed Navigation with SharePoint, and in my case SharePoint 2013.

In my case, when using Managed Navigation with a termset, and navigating to a page that had a friendly URL configured for it, then the 'selected' CSS class would never get applied to the HTML - it was completely missing (except on the homepage/site root page.

There is a setting in the Term Store Manager, for one of the terms, under the 'Navigation', called 'Associated Folder'.

If you set that folder to the same folder of your friendly URL, then finally the 'selected' CSS class is output by SharePoint - yay!

Props to this article, which is where I found the solution: http://sadomovalex.blogspot.com.au/2013/04/managed-metadata-navigation-and.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.