In this article I am describing the differences between site definition and site template. Many people have asked me in which situation should we go with site definition and in which should we go with site template. All these questions will be answered in this article. Site Template The first option for getting the SharePoint Designer changes beyond the current site is to take the site you have modified with SharePoint designer and save it as a template. You can download the template and upload this to another site collection and can create a site based on this template. Whenever you need a new site you can create it from the site template you have created. This is a good approach if the design is finalized and you want to reuse the same template in different site collections. But keep in mind you can't go back and apply the changes after the site is created. If you make any changes to the work that you did on the original site then those changes won't be reflected across the other SharePoint sites that were created from the same template. This is because each page exists separately in the SharePoint database. So site templates solve the problem of getting SharePoint Designer changes into multiple sites but without the ability to adapt to changes in the future. Once the design is done we have to go to each site then do the same changes we want. Site Definitions This approach solves the problem of site templates. Here changes can be affected to them after they have been created. Site definitions exist on the file system of each of the front end web server. But as I mentioned earlier site templates exist in the content database. Each site which is created from the site definition doesn't make a copy of the page in the content database; but it stores a pointer to the site definition file. When a page on the file system changes it changes all of the references in the database thus solving the problem of making changes to existing branding or other functionalities. Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site. In order to create a site definition, we should first have to get the changes to the files that we want into files. We can do this from SharePoint Designer by selecting Save As and pointing to a directory. Now you can create the support files for the site definition including the ONET.XML file which tell how the site definition is used, and the WEBTEMP.XML file which makes the site definition show up as an option. Better you start with a copy of the STS site definition that comes with SharePoint and make your changes there rather than starting from scratch. So in a nutshell 1. To create or use a site definition you need server admin access, but site template can install from web UI by site owners. Site definition supports feature stapling, but for site template additional features must be activated in gallery. Site definitions are stored on hard disk, but site templates are stored in content DB. Site definition can provision multiple webs, but site templates are for single web only. Creating site definition is relatively more complex than site template creation. My organization has multiple clients. And we need to create similar site collections (with 4 lists and few items which must be the same for every client) for each client. So I was advised to create 1 site collection and then take backup of this and for every new client, to restore this when creating new site collection; rather than creating fresh sitecollection with new lists. • I would like to know, in simple words, what is difference between site template and site definition? • So, when we backup a sitecollection, are we backingup the site template or the site definition? Site Templates: Are snapshots of sites at a point in time. What is difference between site template and site. Site template and site definition? Of WFE during installation of SharePoint. Site definition files. Site Definitions vs. Web Templates. The third option is using site templates. In SharePoint 2007 site templates could only be created by using the “save site as. Jul 22, 2011 Site definitions vs. Web templates. Upgrades to following SharePoint version. I upgraded from 2007 and have site definitions. When a user customizes a site from the UI or SPD, the custom template consists of the difference between the original state of the site (determined by its definition) and the state of the site or list when the custom template is generated. Custom templates remain tied to a particular site definition (for example, the site definition for SharePoint Web sites or Meeting Workspace Web sites), so that if the site definition is not present or is changed, the custom template cannot work. Site Definitions: As the name implies, A Site definition is 'core definition of a site'. Each site definition emerges through a combination of files that are placed in the 12 hive of WFE during installation of SharePoint. Site definition files include.xml,.aspx,.ascx, and.master page files, as well as document template files (.dot,.htm, and so on), and content files (.gif,.doc, and so on).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |