I'm attempting to create an application for SharePoint.
I would like this application to live as a subsite under the root site collection.
It would be great if I could give this to clients, and just have them deploy the WSP, have the package create a subsite, and then deploy all of my pages and webparts to this subsite.
I've been googling for some time, but can't seem to get an answer.
*ANSWER*
Instances of SPWeb have a .add() method that allows you to create a subsite.
I'm going to create a Feature whose sole purpose is to check for the existence of a "/whatever" subsite at the RootSite level, and if it does not exist create it during the FeatureActivated event.
I am then going to make my other features dependent on this feature to make sure this site exists before deploying to it.
a subsite = SPWeb... so just create one in the site collection programmatically by creating a new SPWeb in the featurereceiver of your solution? Or you can even script it using powershell...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With