.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to decide whne we should use site definition or site template?

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
What is the difference between site definition and site template and whne do use site definition and site template?

View Complete Post

More Related Resource Links

feature stapling done against site definition breaks when saving site as a template?

Hi, we have a bunch of feature stapling done against some of our site definitions on a solution we are working on. This feature staple has a bunch of feature dependancies which all work in a variety of ways. One of these dependancies then uses a feature receiver class to do some post provisioning setting up of web part connections and the like. This all works very well when creating a new site from a site definition etc etc. The problem arises when a user opts to provision a site in this way, and then uses the 'save as template' function within sharepoint. (BTW this is WSS 3.0 / MOSS). The site template saves correctly, but now the feature receiver never runs. I'm assuming this is because the associated feature staple doesnt run either? I've looked around and seen some reference to feature stapling not working against templates. Is this true? 

Using List templates - saved template has no site definition id or feature id - does not appear in S

I have a Record Centre site in SharePoint Server 2010 and have created a number of record libraries. Due to a reorganisation, I need to split my main record library up into about 20 separate libraries, so decided to use the list template as a means to create the new libraries with the same content types, views and workflows.

Used one of my libraries with no content and did Library Settings - Save document library as template and gave a name. Seemed to save OK to the List template gallery.

When I go to Site Actions - More Options the new template does not appear

Have done a fair bit of searching and I think the problem is that the .stp does not seem to have any site definition id and no means to add one.

Have enabled the SharePoint Server Publishing feature at the site level, as suggested by another post, but still has not resolved the problem.

Would value any ideas or insight. Thanks

Invalid Template error after deploying site definition to different environment



I have developed a custom site definition with some custom features and web parts.All Works fine in my development environment i.e site is being created with necessary features and lists. But when I copy the respective files and folders to Production environment and installed my custom features and also run the IISRESET command and click on Create button by selecting my site definition in template section, its giving "The template you have chosen is invalid or cannot be found" error. But a few days prior I have deployed a initial version of the same site definition with same features and every thing had worked fine. I am going crazy of this absurd behavior of SharePoint.its really annoying as it accepts the same definition a few days prior and gives unfriendly error afterwards. If anybody had solved this issue please share it to me to get out of this.



workflows when saving site as template with content

I have have a MOSS 2007 site on a production server with custom workflows.  I saved the site as a template with content and used the template to create a sibling site.  I am testing it and the workflows aren't working.  Is this to be expected? I have read that workflow don't work when saving between development and production, but I can't find anything that addresses both sites being on production. Will I need to recreate the custom workflows by hand? 

Is there a way to update the template of a site?


I am looking for a best practice for managing and applying site design changes.

For instance, in another platform, I could release a site for testing or production use, so content would be added.  At some later date, a change* to the design would be needed and I would take a copy of the design only, make the change and then apply the updated design to the existing site. Content would be maintained but the new design changes would be applied. 

      *A change might mean creating new functionality on an existing element, adding new elements or changing an existing element.

How best should this be done in WSS?

Thank you in advance!

Set Site Icon in Site Definition

Hi,I am trying to set the default Site Icon in my custom site definition.I have changed the titlegraphic.gif in my master page to a new name but that didn't work.In the site definition I have also set the SiteLogoUrl to an image, but that didn't work either.Some people suggest that you should replace the default titlegraphic.gif file with your own image and give it the same name, but I don't see how this could be any good since an update to the sharepoint installation might just overwrite the image again with the default one.Any help would be appreciated!Thanks

Navigation settings not applied when site created from template?

Hi, I created a customized site on MOSS and disabled Quick Launch and enabled Tree View on it. But when I create new site from this template it has Quick Launch enabled and Tree View disabled. I downloaded the STP file and looked inside and in the details <Details> ... <EnableTreeView>1</EnableTreeView> <EnableQuickLaunch>0</EnableQuickLaunch> ... </Details> Does anyone have a clue why it does not work correctly? Does this work for you correctly?  

Creating a new root Site Collection using a custom site definition file (ONET.XML)

Using Powershell, I am trying to deploy the our custom solution to SP 2010.  The script is doing the following: Deleting the web application using Remove-SPWebApplication Creating a new web application using New-SPWebApplication Adding and deploying a series of WSP files (one of which has the site definition file in it) using Add-SPSolution and Install-SPSolution Create a root site collection based on the site definition file provided in the WSPs using New-SPSite I get the error "WARNING: Template is not found and is not applied." When I run Get-SPWebTemplate, my site definition does not show up. I saw this: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/5ea46e07-a4b0-4bab-b698-9b6eeb695607 but I want a solution that does not involve me reloading a DLL, as, I feel there is something else I am forgetting. I have also tried: IISReset Resetting the timer service Cleaning the Cache (as described here: http://support.microsoft.com/kb/939308) Nothing seems to work.  Does anyone have any ideas?

Publishing site template saved using /_layouts/savetmpl.aspx

A trick we used in MOSS 2007 doesn't seem to work in SharePoint 2010 although it seemed to work for someone who asked the same question in this forum.  We know publishing site do not have the "Save as site template" as an option in the site settings so we used <site>/_layouts/savetmpl.aspx to save the site template.  Unfortunately, new site created using the saved template is throwing a 404 error.  And the site was actually created (can see in View All Site Content).  We need to be able to easily create sub-sites with the same look and feel and set of document libraries/lists.  Any advice? 

sp2010 - move site template ( or site ) from one site collection to another ?

Is it possible to save a site as a template in site collection A and move it to site collection B ? Can this be done using out of the box functionality through the browser or do I need to use powershell or some other tool ? please advise. thanks and regards, Counie  

how to create site collection by using custom template through programmatically?

hi all, how we can create site collection by using custom template through programmatically? please give me some suggestions. where we need to save this custom template... thanks in advance..

site template for knowledge mining

Hello All, Which template should I use for Knowledge Mining – where each user defines their own subjects of expertise and can be effectively searched for based on skill and skill level. Thanks for any suggestions...

which one is better site template or site collection template for creating site collection?

hi all, i want to create site collection by using custom template. So I created one site and i saved as a template and i want to use this site template to create site collection...can we use site template  or site collection template to create site collections? what is the difference between site template and site collection template? please advise me which one is better..... thanks in advance...

how to add custom site collection template in central admin site in SharePoint2010?

hi all, how can we add custom template in cendtral admin in sharepoint 2010? In 2007, we can add by using the stsadm tool addtemplate operation....but 2010 tremplate is saved as a solution file not a .stp file...so how we can add this template in central admin site in SharePoint 2010? Please give me some suggestions...... thanks in advance.....

Deploying custom 2007 site definition to 2010

For a customer I am upgrading their SharePoint 2007 enviroment to SharePoint 2010. After a succesfull upgrade I am stuck with one last annoying problem: when creating a publishing site collection using a custom definition the provisioning of the site definition  fails. Interesting about this is that the provisioning works from the central admin UI, but this customer has an custom webpart for creating site collections in a web application outside of Central administration. The simplified code for this is: public static bool Create(SPWebApplication webApp, string Url, string siteTitle, string siteDescription, uint lcid, string siteTemplate, string ownerLogin, string ownerName, string ownerEmail)         { SPSite site = null; try { SPSite newSiteCollection = webApp.Sites.Add(Url, siteTitle, siteDescription, lcid, siteTemplate, ownerLogin, ownerName, ownerEmail); newSiteCollection.Close(); newSiteCollection.Dispose(); site = GetRootSite(webApp); bool r = (site != null) ? true : false; return r; } catch { return false; } finally { if (site != null) site.Dispose(); }         } The exception is thrown when webApp.Sites.Add() is executed. The user we are logged in as, as wel the appID, are Farm Admin's. The ULS shows this exception: Exception thrown while fetching field by internal name 'Wiki_x0020_Page_x0020

Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programm

Topic This is maybe my last post about the Team Site Wiki Page customization with the aim of exceeding its limitations. This time we are going to customize the unique template ( wkpstd.aspx) by replacing the control that renders the editable content by a custom one. In this post example, we will take advantage of the use of this custom control to render not editable additional contents, for instance, a header and a footer that could be the same for a specific Wiki Page Library. Of course, we are not going to really customize the template, but we are going to use a delegate control to replace the control at runtime. Here are the screen shots of the result: We can see a non editable Header and Footer on the Team Site Wiki Page In edit mode these additional contents are not rendered, but we can add new content as usual And of course, after having saved the page, the new content is rendered wtih the non editable Header and Footer. Steps required   If you look at the Team Site Wiki Page template, wkpstd.aspx, you can see the control that is rendering the editable content/ <SharePoint:EmbeddedFormField ID="WikiField" FieldName="WikiField" ControlMode="Display" runat="server" /> We are first going to create a custom EmbeddedFormField control Then, we are going to use a delegate control to replace the native EmbeddedFor

how to create site collection by using custom template through programmatically?

hi all, how we can create site collection by using custom template through programmatically? please give me some suggestions. where we need to save this custom template... thanks in advance..
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend