Question

can we create a site definition with publishing page library, sub sites with blog and wiki template and then custom columns(like taxonomy field)?

I want to understand which approach is better in SP 2013, site definition or web template or feature stapling or any other way.

Was it helpful?

Solution

Yes you can.

  1. Create a Master list and have it as your site collection information list to create new site collections.

  2. Create an event receiver and trigger an event after item created in that list.

  3. Wrap all the information to your event receiver which you wanted and have same info in the list columns as items.

  4. You can create a master page, page layout, list definition and all other features like taxonomy to your event which is coming as the items from your master list and use it to create the site collection you need.

  5. Event receiver will take much time to run based on the number of actions you want to it to perform. But this can help you out

Thanks.

OTHER TIPS

None of the above. Create a powershell script to create sites, subsites, lists, etc. Specifically, check out the pnp powershell library, and more specifically, the pnp provisioning framework. Since it uses the CSOM, it can be run from remote machines, and is compatible with different versions of SharePoint, including online. (You may have no plans for a migration at the moment, but when you do move to a new version, it's nice not to have to spend a huge amount of time rebuilding these things.)

If you need to have a user create these sites without powershell, use the pnp libraries from a separate application that is called from SharePoint. Again, this way if you migrate to SharePoint online, for example, the provisioning application can simply be moved to Azure. Another benefit is that the provisioning code can be deployed and updated without having to recycle any app pools, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top