I want to add a user interface where user create a Sharepoint SiteCollection for each project. For example we have textbox where we can put a name of the project, it will be also the name of the siteCollection, when he hit a button, a site collection is created, with 3 sites, their pages and webparts (same architecture for all the created site collection). My question is : is this need possible to be realised, if yes could you please give me some steps to perform. Thank you
1 Answer
When you say you wan to add user interface, do you mean a web page or a windows form ?
In both case you would have to use SERVER object model to create site collection pragmatically..This page/windows application has to run from windows server where SharePoint is installed...
http://zabistop.blogspot.in/2008/07/programmatically-creating-site.html
Other option could to be to use powershell script and somehow execute this powershell script on hit of button.
https://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/
Some discussion on this is on below link
Hope this helps!!!
-
@Siddarth thankx for your help, I was thinking to add textbox , for the name of the site collection, and a button to create it. I will read your link. the problem is how to create the pages and add the webpart already developped in each site collectionBKChedlia– BKChedlia2016-09-29 06:36:54 +00:00Commented Sep 29, 2016 at 6:36
-
MAybe there's a way to save site collection (with his sites, pages, Webparts) as template ?BKChedlia– BKChedlia2016-09-29 07:05:40 +00:00Commented Sep 29, 2016 at 7:05
-
yes..you can always save site a template which includes content...but if any custom web part developed has to be deployed first on site collection/web application else web part won't work......!Siddharth Vaghasia– Siddharth Vaghasia2016-09-29 10:12:06 +00:00Commented Sep 29, 2016 at 10:12