Answered Removing the 'My Profile' QuickLaunch Items Programmatically

  • Friday, January 01, 2010 1:43 PM
     
      Has Code
    Dear All

    I've been able to programmatically remove unwanted items from the QuickLaunch menu with the following code:

    SPNavigationNodeCollection nodes = curWeb.Navigation.QuickLanuch;
    
    foreach (SPNavigationNode node in nodes)
    {
        if (node.Title == "Surveys")
        {
            node.Delete();
        }
    }
    However, I can't seem to be able to pick up the links that appear under the My Profile part of the QuickLaunch, for example Details, Links, Colleagues or Memberships. Some of these are not relevant to us and so I'd like to remove them -- is there a way I can get to them programmatically?

    Many thanks and Happy New Year

    Daniel

Answers

  • Monday, January 04, 2010 9:07 AM
    Moderator
     
     Answered

    Hi,

     

    After consulting with our internal channel, I get the feedback that you can’t modify the My Profile section menu items.

     

    You may notice that the My Profile section is not available for customization from the Site Setting page.

    And the My Profile section uses MySiteLeftNavProvider provider to generate the menus which is different from normal menu items.

    According to the class description, this MySiteLeftNavProvider class and its members are reserved for internal use and are not intended to be used in your code. even if you access those items using Object Model, you can’t change it.

     

    Sorry for your inconvenience and hope the information can be helpful.

     

    Lambert Qin

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact mtngfb@microsoft.com  


    Sincerely,
    Lambert Qin
    Posting is provided "AS IS" with no warranties, and confers no rights.

All Replies

  • Monday, January 04, 2010 9:07 AM
    Moderator
     
     Answered

    Hi,

     

    After consulting with our internal channel, I get the feedback that you can’t modify the My Profile section menu items.

     

    You may notice that the My Profile section is not available for customization from the Site Setting page.

    And the My Profile section uses MySiteLeftNavProvider provider to generate the menus which is different from normal menu items.

    According to the class description, this MySiteLeftNavProvider class and its members are reserved for internal use and are not intended to be used in your code. even if you access those items using Object Model, you can’t change it.

     

    Sorry for your inconvenience and hope the information can be helpful.

     

    Lambert Qin

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact mtngfb@microsoft.com  


    Sincerely,
    Lambert Qin
    Posting is provided "AS IS" with no warranties, and confers no rights.
  • Wednesday, January 06, 2010 8:29 PM
     
     
    Dear Lambert

    Thank you very much for your help -- the information you provided is very useful -- at least now I won't spend forever working on something which isn't possible.

    Kind regards
    Daniel
  • Tuesday, February 02, 2010 3:50 PM
     
     Proposed Answer
    Hi,

    I ran across the same problem a few days ago, but this problem can be tackled really easy ;)
    Go to your SharedService Provider and click "Profile services policies". It's also possible to navigate to your http://ssp-url/ssp/admin/_layouts/ManagePrivacyPolicy.aspx .
    In this overview, you see some Headers:
    - membership
    - my colleagues
    - My Links

    If you set the default policy on "Disabled" instead of "Enabled" then those items won't show up in your menu anymore. It's not possible to remove the "My Details" link from the quick launch, because that one is hard coded into the MySiteLeftNavProvider:

    childNodes.Add(new SiteMapNode(this, "MyInformation-Details", url, title, title));

    check my blogpost for some more information: http://bloggingabout.net/blogs/bas/archive/2010/02/02/removing-my-profile-menu-items-from-the-quicklaunch-menu-on-your-mysite.aspx

    • Proposed As Answer by Bas Lijten Monday, May 24, 2010 5:46 PM
    •  
  • Wednesday, March 24, 2010 11:42 AM
     
     

    Hi Bas Lijten,

    When I try to disable the "Colleagues on My Site" policy (to have the "Colleagues" item removed from the Quick Launch My Profile section on My Site), the Policy Setting drop down box is grayed out. Therefore I cannot disable this policy and remove the menu item from My Site quick launch.

    You solution does work for "Links on My Site" policy, however.

    Any ideas how to bypass this last curiosity?

    Thanks in advance!

  • Wednesday, May 12, 2010 11:11 PM
     
     

    Hello Bas,

    Is there a way to remove the ability to upload pictures and documents as well?

    Jason

  • Monday, May 24, 2010 5:42 PM
     
     

    Hi Barry,

    I think we solved this problem 2 months ago, I will check back asap.

    regards,

    Bas

  • Monday, May 24, 2010 5:44 PM
     
     

    Jason,

    this option is handled by putting the right permissions on every user(group). Read only, for example, removes the ability (and option) to upload pictures and documents.

    Bas