I have the need to programmatically create a team site, add a selection of apps to the site and populate some web parts on the page.
What I have done:
I have created the site
I have successfully added content editor web parts in to the rich text zone (wpz) of the page
I have successfully added apps to the site (Calendar, picture library etc.) and can see them in site contents
What I cannot figure out how to do:
- I can't find a way to get these existing apps on to the page (the calendar etc.) and displaying in their respective list views as if they were being done manually. They are all OOB apps.
I have tried using the same method I used for the content editor web parts, but the XML for the apps is specific to the page and therefore cannot be reused for new sites - it has URl's and guids populated in the XML. (Note that the export button had to be manually exposed the get this XML in the first place)
If anyone has any suggestions as to how I can get these existing (but newly created) app parts to display on the page using C# that would be greatly appreciated.