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.
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.
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
Copy the web features and site features from the file we just opened to your site definition ONET.XML file.
- Finally I will include all the document template , copy document templates element from the file we just opened to your own ONET.XML
- 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