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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: