SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
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
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


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.