Pregunta

I want to define a site structure :

  • Root Site

    • Subsite A

      • Subsite A.1
    • Subsite B

      • Subsite B.1
      • Subsite B.2

How to save it as a template to reuse it later ?
I tried the save as template feature but it doesn't include the subsites.

¿Fue útil?

Solución

Not possible using template. You need to do it programmatically, there are many alternatives depending on who is creating the sites, such as:

  1. implement custom SPWeb scoped Feature that you activate on parent site and it will create the site hierarchy (it can be activated by parent site owners from Site Settings -> Site Features)
  2. JSOM code that creates the subsites. Trigger JSOM code from a button on the site. Use this if you prefer using client side object model and don't want to create custom Feature using Visual Studio. (you can place the button pretty much anywhere, but whoever clicks on it needs to have owner permission on the parent site below which subsites are created). Example here.
  3. PowerShell script to create the hierarchy (for admins only who have access to server)
Licenciado bajo: CC-BY-SA con atribución
scroll top