次の方法で共有


Help! I have deleted the Topics Area! (or any of the standard areas)

This has come up a number of times, both internally and with customers I have worked with, so what do you do when you have deleted one of the standard SharePoint Areas?

The first thing to say is that it is not a really a good idea. Instead of deleting one of these areas (News, Topics, Sites) I would instead hide it and then lock down security so that only an Admin can access it. This essentially deletes it for all users anyway. The reason I would recommend this approach, rather than deletion, is mainly because these are "special" areas. While you may be able to get them back functionally, you can't ever TRULY get them back.

To give you a couple of examples:

1. The Topics area is special because this is what drives the left hand navigation on the home page. If you delete the Topics area then you will notice that this control will instead display all the top level areas (the same ones as are appearing on the horizontal navigation bar across the top). This SPS control is driven off the Topic Area's "Category ID", these are automatically generated by SharePoint and unique, so even if you create a new area and name it "Topics" the navigation on your home page will not magically start "working" again (this also explain why if you rename the Topics area this functionality continues to work!).

I know what you are thinking. If I HAVE deleted the Topics area, or I have hidden the Topics area, how do I control what areas are displayed as navigation on the home page of my Portal. Well you can set this control to instead be driven off any area on the portal. To do this follow the following instructions:

a) Open <drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\<Locale ID>\SPS\default.aspx
b) Search for the following string: <SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" />
c) Replace it with the following string: <SPSWC:CategoryNavigationWebPart runat="server" id="NewVerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID=" <INSERT CAT ID HERE> "/>
d) Where <INSERT CAT ID HERE> is equal to the Category ID of the area whose children you wish to display as navigation. To get the Cat ID: Browse to an area, then click on "Change Settings" and copy the string that appears after "CatID=" in the URL.

2. One thing that is harder to fix, and really highlights why you should not delete these areas, is that there are a number of features in the SharePoint object model that allow you to quickly and easily access the system areas programmatically. I suspect that these calls are going to be used by custom web parts and third party SharePoint add-ins. I also suspect that once you have deleted a system area there is no way to reconnect the object model features.

Comments

  • Anonymous
    May 28, 2004
    I've never used SharePoint, but obvious question here is why those "special" areas even can be deleted (easily?), wouldn't it make more sense to override the default delete for special areas to just hide them or hide the delete functionality. Or maybe I should not comment when I have no clue anyway :)
  • Anonymous
    May 30, 2004
    The comment has been removed
  • Anonymous
    May 31, 2004
    There is one way to use get the "Topics" area again. You will have to directly access the database and modify a value. Here are the details.
    First create the "Topics" area again in the SharePoint website.

    Then Goto :-
    Database: (SPSITENAME)_SITE
    Table: CatPredefined.

    Row:
    Key = 2, Value = (Topics Area Guid).

    Restart IIS.
  • Anonymous
    May 31, 2004
    Hey Bil,

    You are absolutely right, functionally this will "recover" your sites directory, however again OM calls to return the "Site Directory" will fail. It is possible that some Third Party tools will rely on this functioanlity. So it is not a complete recovery.
  • Anonymous
    May 31, 2004
    Hi Ignatius, while your instuctions may work I would have to urge caution. Making changes directly to the database cannot be supported by Microsoft. There is just no way of being sure that you are updating everything SharePoint needs to have updated in order to function correctly.
  • Anonymous
    May 31, 2004
    Hey zzz, Feel free to comment. You do raise an interesting point, and one that I unfortunately do not have an interesting answer to!
  • Anonymous
    June 01, 2004
    By doing what I suggested before will cause some serious side effects, such as not being able to index, search properly, etc. The way to truly fix the deleted Topics area is to drop the Portal sites and rebuild them which is worthwhile only if you got nothing in them.
  • Anonymous
    July 08, 2004
    The comment has been removed
  • Anonymous
    July 11, 2004
    The comment has been removed
  • Anonymous
    July 15, 2004
    Leland,

    Maybe you just added the CurrentCategoryId and didn't change the ID of the navigation bar. You have to change it, don't know why but I didn't and had the same result as you.

    One more question : what about the name of the root area specified in the CurrentCategoryId ? Is it possible to make it appear, as for "Topics" when nothing is specified ?

    Christophe
  • Anonymous
    July 15, 2004
    I sometimes have to search before post :-))

    This is it : adds the ShowTitleForVerticalOneLayer="true" property in the tag.

    ;-)
  • Anonymous
    August 04, 2004
    Hi all,

    I've tried the sollution which was given and it works great.

    <SPSWC:CategoryNavigationWebPart runat="server" id="NewVerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID="<INSERT CAT ID HERE>" ShowTitleForVerticalOneLayer="true"/>

    I've deleted the topic section to test what happends and how to get it back. This option is the best I can find. This is also a great option if you want another area to be shown as subitem instead of the Topics.

    Thanx for the sollution,

    Cheers.