locked
DOes Site Definition includes all the contents in original site RRS feed

  • Question

  • Hi all,

    I have worked with Site Templates earlier but facing some problems with it such as site content types will not be included in the resultant template,Sub Sites will not be created in the template etc. Does Site definition overcomes these problems? i.e. if we cretate a site definition can we ensure that the Site content types,site columns,sub sites,features,Branding ... all will be created automatically after creating the new site from this template...? or not.These things are not coming in Site Templates.this attracted me towards SiteDefinition.I just want to know that by defining site definition can I overcome all these problems or not.

    Thanks,

    PAVAN

    Wednesday, February 23, 2011 12:55 PM

All replies

  • What you are referring to is lots of customization type stuff for sites.  A site definition will only get you part of the way there.  The best thing to do is to write some code to programmatically create the sub site, apply branding, activate Features etc. and tie that code into a SiteCreated event receiver.  To get started with event receivers, start here:

    http://blog.sharedove.com/adisjugo/index.php/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch/

     


    I trust that answers your question...

    Thanks
    C

    http://www.cjvandyk.com/blog
    Wednesday, February 23, 2011 3:51 PM
    Answerer
  • Hi Van,

    Thanks for the Reply.But I have seen one Site Definition in one of my Systems that if you create a site using a Template from that Definition. The Site created will have Custom Branding,One Default Activated Custom Feature,one Sub Site Automatically created and Certain Content types and Certain Columns corresponding them and lists have those content types being used.By what means they would have done this..? can you throw some light on this...? According to your reply they should have done this by Custom Code using Event receiver(i.e. it is not possible by Site Definition too).So can I conclude that they have used some Coding along with Site Definition but not created a custom definition OOTB..?

     

    Thanks,

    PAVAN

    Wednesday, February 23, 2011 4:32 PM