I have webtemplate (not a site definition) which is an exported site. I want to create a subsite in this site. I want this to happen when a new site of this template is created. But I don't know how. I have the following problems:

  • I've tried using a webeventreceiver, but I'm deploying to the bin so I can't use eventreceivers.
  • I've tried using a siteprovisioningprovider but I don't know how and if it's even possible to link this to my webtemplate.
  • For as far as I know it isn't possible to include a subsite in a template.

How can I accomplish this?


I would create a feature that creates a site through code based on your specifications, and reference this feature in your webtemplate's onet.xml.

  • I know, but then I have to use a feature receiver. I can't use a feature receiver because I'm deploying to the bin. – Marlou Aug 6 '12 at 15:16

It seems to be this is not possible. I ended up creating the subsite in code when the parentsite is created. The big disadvantage is that if I want to create the site manually, I also have to create the subsite manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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