Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a site definition in which I have a series of web scoped features getting activated.

Some of the features are meant to set targetting audiences on webparts, some of them are creating lists to be shown in webparts etc.

What I want to know is; In what order does the site definition create pages, subsites, activate features, run timerjobs etc and what is best practice to ensure the entire workflow runs correctly?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

SharePoint MCM Mirjam van Olst has written everything about the provisioning order: http://sharepointchick.com/archive/0001/01/01/site-definition-provisioning-order.aspx

Bottom line is that building pages with web parts using Site Definitions is very complex, and often leads to bad solution designs. I would suggest that you look into using WebTemplates instead: http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx

share|improve this answer
    
Thank you for the links. Another thing I'm interested in knowing then, is when I'm attaching a SPWebProvisionProvider to the site template, does the code in this provider then run before, alongside or after the site definition provisioning? –  Daniel Ziga Aug 8 '11 at 12:18
    
With a provsioning provider, you'll basically do it all manually... –  Wictor Wilen MCA MCM MVP Aug 8 '11 at 13:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.