0

I have a web template that users can create sub sites from. I want to activate a feature when the subsite is created e.g. create list, columns etc for that sub site only.

How would i approach doing this?

user1786107
  • 783
  • 4
  • 12
  • 33

2 Answers2

0

To solve this you can use Feature stapling. Also see What is “feature stapling”?.

eirikb
  • 7,405
  • 5
  • 35
  • 67
0

Generally speaking, when you want a FEATURE activated for any web created in the farm using a specific web template, you use FEATURE STAPLING.

But, if you want a FEATURE activated for any web created in a particular Site Collection only, you should use WEB PROVISIONED event. For more information on, WebProvisioned event, check here: http://stefan-stanev-sharepoint-blog.blogspot.com/2010/09/webprovisioned-event-receiver-practical.html

Ashish Patel
  • 11,385
  • 3
  • 22
  • 29