none
Can't modify Top Link Bar on Site Collection RRS feed

  • Question

  • Hi everyone,

    I have been trying to modify the top link bar of a site collection, however, I've been running into problems.  I have tried two approaches so far.  I tried doing it programatically by creating a custom feature that make the modification upon activation (and would then undo the modification upon deactivation), however, when activating it an exception is thrown stating, "the top link bar can only be edited for a Web site with unique navigation." 

    I've found references to to a link for the Top Link Bar under the Look and Feel section of the Site Setting, however I can't seem to see it anywhere.  I see the Navigation link but that only modifies the quick launch menu. 

    I'm just wondering if anyone has any experience with this and knows of a solution or can point out anything that I'm missing.

    Thanks!

    Monday, February 26, 2007 4:08 PM

All replies

  • It happened to me as well, the same scenario..
    Wednesday, August 13, 2008 11:46 AM
  • You get this error when you try to modify the top link bar for a website that is using the top link bar from its parent site. Check the SPWeb.Navigation.UseShared property. If it returns true, then the website does not have a top link bar; it is using the parent's.
    • Proposed as answer by Don_Lundman Thursday, October 7, 2010 6:19 PM
    Thursday, October 7, 2010 6:19 PM
  • several steps to do this:

    1. go to site collection features->enable "SharePoint Server Publishing Infrastructure " feature

    2. Go to site setting click "navigation " under "look and feel "

    3. do what you want to do

     

    please make it answer if it is really help you.


    SharePoint Gardener in China
    Saturday, October 9, 2010 7:11 AM
  • The error indicates that the current website is using the parent site's top link bar. You can check in the UI:

    1. Click Site Actions

    2. Click Site Settings

    3. Under Look and feel, click Top link bar.

    If you see "X Stop Inheriting Links" then the site is using the parent's top link bar. You can either click the link to stop inheriting or make your change to the parent site's bar.

    In code, you should test the value of SPWeb.Navigation.UseShared. If it is true, the top link bar is inherited. You can stop inheriting by setting the property to false. Or you can check SPWeb.ParentWeb.Navigation.UseShared to see if the parent has a unique top link bar. If so, make your change there.

    • Proposed as answer by Don_Lundman Monday, October 11, 2010 3:35 AM
    Monday, October 11, 2010 3:34 AM