Home > SharePoint 2010 > Create Site Definition in SharePoint2010 Part2

Create Site Definition in SharePoint2010 Part2

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.
Categories: SharePoint 2010
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment