When implementing SharePoint Portal Server, there are cases that you have to create the same portal structure a few times. For example, all the developers need to have the same portal on their development machine, there is a test enviroment or a production enviroment. Then when the portal goes live, you’ll have to create an empy portal again with the same stucture and content as the test enviroment. SPS provides config files that can help you with this in a very efficient way: SPSPredefinedCategories.xml.
The SPSPredefinedCategories.xml file is located in the SPS site template directory (Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPS\SPSConfig\) and it contains the complete structure of a clean portal. So, when you create a new portal, it contains the news area, the sites area and a topic stucture etc.. These areas are defined in this file and if you like you can create you own predefined structure easily, including webparts, lists and other content (also using the onet.xml files in site templates). I.E., the Sites area (site directory) is defined like this:
<Category>
<Title _locID="PredefinedCategories_SitesDirectory_Title">Sites</Title>
<WebTitle>SiteDirectory</WebTitle>
<Description _locID="PredefinedCategories_SitesDirectory_Description">The Site Directory lists Web sites associated with this portal site. You can browse for sites based on their properties, search for sites, and find sites of special interest in Spotlight Sites.</Description>
<Navigation>1</Navigation>
<AutoApprove>1</AutoApprove>
<CategoryType>SiteRegistry</CategoryType>
<WebTemplate>SPSSITES</WebTemplate>
<IsPublicNav>1</IsPublicNav>
<Order>6</Order>
</Category>
The settings like which template is used and if the area is in the public navigation are all customizable, so imagine that you can create the whole stucture, lists and other content in this file, deployment will be a matter of creating a new portal and all is set! The same for developers, when they need a new portal structure update from another developer (i.e. new custom webparts or lists) just delete the existing portal and create a new one with the updated SPSPredefinedCategories.xml file.
There are some points that must you must consider:
- There is only one template directory per server, so each additional portal will inherit the same structure.
- It takes some work to keep the xml file up to date, so be careful to consider this is appropiate for your implementation.
- When updatating you must re-create the portal, so you loose all the content in your current portal
With thanks to Arnold and Wouter 