Search This Blog

Tuesday, March 17, 2015

Create SharePoint 2010 Site Definitions using Visual Studio 2010


          In Microsoft SharePoint 2010: Creating new site definition clicking “New Site” on the Site Action menu. The system should generate based upon the Onet.xml file from 14 hive path. Default site definitions are generated by onet.xml. So when we create a custom site definition using Visual Studio 2010 need create Onet.xml file. We are playing around in the onet.xml file. Once we can create onet.xml and deploy into server (%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\GLOBAL\XML).
           There are two onet.xml file are installed during install Microsoft SharePoint 2010 in global onet.xml file and individual onet.xml file. The gloabal onet.xml file are installed in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\GLOBAL\XML and individual site onet.xml are installed %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\GLOBAL\SiteTemplates. The individual site template have own onet.xml file such Blog site, Central administration site , Team sites and etc.
Onet.xml file is part of the Web template file, CAML elements are not inside the onet.xml file it’s part of web template file
Web template
CAML Elements
Onet.xml
Achievement:
Describe below steps to create a site definition and deploy into the SharePoint server 2010
1.Create visual studio application
Start -> Microsoft Visual Studio 2010 -> File Menu -> New Project->
clip_image002
Name: <your site definition name>
Location: <your working location>
Solution name: <solution name>
List of List Template ID
Feature IDNameList Template
00bfea71-e717-4e80-aa17-d0c71b360101Document Library101
00bfea71-1e1d-4562-b56a-f05371bb0115Form Library115
00bfea71-c796-4402-9f2f-0eb9a6e71b18Wiki Page Library119
00bfea71-52d4-45b3-b544-b1c71b620109Picture Library109
2510d73f-7109-4ccc-8a1c-314894deeb3aReport Library433
29d85c25-170c-4df9-a641-12db0b9d4130Translation Management Library1300
00bfea71-dbd7-4f72-b8cb-da7ac0440130Data Connection Library130
0be49fe9-9bc9-409d-abf9-702753bd878dSlide Library2100
00bfea71-d1ce-42de-9c63-a44004ce0104Announcements104
00bfea71-7e6d-4186-9ba8-c047ac750105Contacts105
00bfea71-6a49-43fa-b535-d15c05500108Discussion Board108
00bfea71-2062-426c-90bf-714c59600103Links103
00bfea71-ec85-4903-972d-ebe475780106Calendar106
00bfea71-a83e-497e-9ba0-7a5c597d0107Tasks107
00bfea71-513d-4ca0-96c2-6a47775c0119Project Tasks150
00bfea71-5932-4f9c-ad71-1557e5751100Issue Tracking1100
00bfea71-eb8a-40b1-80c7-506be7590102Survey102
00bfea71-de22-43b2-a848-c05709900100Custom List100
00bfea71-3a1d-41d3-a0ee-651d11570120Custom List in Datasheet View120
29d85c25-170c-4df9-a641-12db0b9d4130Languages and Translators1301
065c78be-5231-477e-a972-14177cc5b3c7KPI List432
clip_image003
Select deploy as a farm solution in the radio button.
Below image will be a default onet.xml file for custom site definition
clip_image005
There area many section are available such NavBars, Configurations, Module.
In the Configuration section should have various feature like
1. custom list name
2. Site features
3. Web features
4. Modules

No comments:

Post a Comment