SharePoint site definition

Source: Internet
Author: User

I. Overview:

1. After a site is created based on the site definition, the related site definition cannot be deleted. After the site set or website wear is complete, the related site definition files are available, deletion will cause the function to fail to run normally.

2. the XML file in 1033 \ XML is the site definition list. The specific site definition template is defined in the file in template \ sitetemplates and is associated with the configurationid through ID.

3. Each site definition template must have an ONet. xml file

4. We do not recommend that you use custom site definitions. If you do not deploy the template during migration, it will lead to unavailability. This is only a technical discussion.

Ii. Structure Analysis

SharePoint root directory \ 1033 \ XMLUnderXMLFileWebtempdFor example:

 

<Templates xmlns: ows = " Microsoft SharePoint  " > <Template Name = "  Global  " Setuppath = "  Global  " Id = "  0  " > <Configuration id = "  0  " Title = " Global Template  " Hidden = "  True  " Imageurl = "" Description = "  This template is used for initializing a new site.  " > </Configuration> </template> <Template Name = "  STS  " Id = "  1 " > <Configuration id = "  0  " Title = "  Team site  " Hidden = "  False  " Imageurl = "  /_ Layouts/images/stts.png  " Description = " A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions.  " Displaycategory = "  Collaboration  " > </Configuration> <configuration id = "  1  " Title = "  Blank site  " Hidden = " False  " Imageurl = "  /_ Layouts/images/stbs.png  " Description = "  A blank site for you to customize based on your requirements.  " Displaycategory = "  Collaboration  " Allowglobalfeatureassociations = "  False  " > </Configuration> <configuration id = "  2  " Title = "  Document Workspace  " Hidden = "  False  " Imageurl = "  /_ Layouts/images/stdw.png  " Description = " A site for colleagues to work together on a document. it provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document.  " Displaycategory = "  Collaboration  " > </Configuration> </template>

 

first template definition global template, when creating a website, follow the steps described in global the website defines the basic website elements of the wearing device, and then creates other elements based on the specified site definition, global site-defined ONet. XML in \ template \ globar \ XML .

root element project navvars , listtemplates , basetypes , deployments and modules elements,

ListtemplatesThe element includes the definition of the system list and library, such as the master page library, solution library, user list,WebComponent Library, etc;

BasetypesThe node defines the supported basic types of generic list, document library, discussion version, andIssueList;

ConfigurationSection definesLists(List to be created during creation),ModulesElement (Generate corresponding files for the site, such as introducing the basic master page.)

 

second template set to STS template, in STS contains three website templates: team site , blank site , Document Workspace

InTemplate \ sitetemplatesThe folder has the correspondingSTSSite template folder

XML the folder contains one ONet. XML definition file, default. aspx definition team site , blank site home page, defaultdws. aspx definition Document Workspace Home page

ONET. xml:

 

 <  Project  Title  = "$ Resources: onet_teamwebsite ;"  Revision  = "2"  Listdir  = "$ Resources: Core, lists_folder ;"  Xmlns: ows  = "Microsoft SharePoint"  Uiversion  = "4" >  <  Navbars  >  Define navigation  </  Navbars  >  <  Listtemplates  >  Defines List Templates, which are backward compatible and generally not used  </  Listtemplates  >  < Documenttemplates  >  Defines the document template, which is backward compatible and is usually not used  </  Documenttemplates  >  <  Deployments  >  Defines the list, feature, and so on when a site is created  </  Deployments  >  <  Modules >  Generate corresponding files in the site  </  Modules  >  <  Serveremailfooter  > $ Resources: serveremailfooter; </  Serveremailfooter  > 

 

The structure of the site definition is basically analyzed. Next we will create a new site definition.

Iii. TestCode:

(1) InVs2010Creating

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.