Removing My Profile menu items from the QuickLaunch menu on your MySite

A few days ago I ran into a problem, because I had to alter the QuickLaunch menu for the mySites. Easy as Pie, I thought.

I wrote a Feature that was able to add or delete nodes based on it's link name: When using titles there could be a problem when using localized links. The code looks a bit like this: (please note that the Add/delete cases are not included in this example)

SPNavigationNodeCollection nodes = SPContext.Current.Web.Navigation.QuickLanuch;

 

            foreach (SPNavigationNode node in nodes)

            {

                if (node.Title == "Surveys")

                {

                    node.Delete();

                }

            }

 After running the code, I came to the conclusion that the links under the "My Profile" Header weren't in the SPNavigationNodeCollection. After some research, I found out (via reflector) that those links are hard coded in the MySiteLeftNavProvider, see below for a small sample:

string title = StringResourceManager.GetString(LocStringId.MySiteLeftNavMyInfoDetails);

string str2 = StringResourceManager.GetString(LocStringId.MySiteLeftNavMyInfoLinks);

string str3 = StringResourceManager.GetString(LocStringId.MySiteLeftNavMyInfoColleagues);

string str4 = StringResourceManager.GetString(LocStringId.MySiteLeftNavMyInfoMemberships);

string str5 = UrlUtility.EnsureTrailingSlash(ServerContext.Current.UserProfileApplication.GetUserManagementPagesBaseUrl(loadedProfile.MakePersonalSiteUrl())) + "_layouts/";

string url = str5 + "EditProfile.aspx";

string str7 = str5 + "MyQuickLinks.aspx";

string str8 = str5 + "MyContactLinks.aspx";

string str9 = str5 + "MyMemberships.aspx";

 

When looking further into the code, I found out that all but the editprofile.aspx are added to the quicklaunch based on some PrivatePolicy setting. I completely forgot that there is a Profile Service Policy in the SSP. When navigation to that page (http://ssp-url/ssp/admin/_layouts/ManagePrivacyPolicy.aspx) You see the following screen:

 When setting those policies on "Disabled"  you will be able to remove those menu items from the "My Profile" header.

 So this *is* possible, although someone from Microsoft denied this ;)

 

Published Tue, Feb 2 2010 4:22 PM by Bas

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 7 and 4 and type the answer here:
Powered by Community Server (Commercial Edition), by Telligent Systems