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?
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?
To solve this you can use Feature stapling. Also see What is “feature stapling”?.
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