Create Site Definition in SharePoint2010 Part2

Posted by ybbest on YBBest See other posts from YBBest or by ybbest
Published on Sat, 15 Oct 2011 06:45:09 +0000 Indexed on 2011/11/11 18:30 UTC
Read the original article Hit count: 374

Filed under:

In the last post, I have showed you how to create a simple site definition. In this post, I will continue with adding more features and customization to the site definition.

  1. Create a Top Nav bar for the home page. You need to modify the Onet.xml file by adding NavBar Child into NavBars element. (1002 is the magic number for top nav) and then adding NavBarPage under the File element as highlighted below in the picture.

  2. Next, I will include all the site and web features for all the list template and other features that are available in team site. Open OOB team site template by going to 14àTemplate àSiteTemplatesàstsàxmlàONET.XML

  3. Copy the web features and site features from the file we just opened to your site definition ONET.XML file.

  4. Finally I will include all the document template , copy document templates element from the file we just opened to your own ONET.XML
  5. Redeploy your solution and you will see all the document template and list template in your custom site.(Remember to delete all the sites using previous version of the custom definition before deploying and recreation the site.) You can download the complete solution here.

© YBBest or respective owner

Related posts about SharePoint 2010