Forum Discussion

Margaret_D's avatar
Margaret_D
Copper Contributor
Jun 28, 2024

Save document library as a template option has disappeared

Hi 

I am the SharePoint administrator, and only a few week ago, I saved a document library as a template (which I have done many times).  I went to do this today and the option has disappeared.  The custom scripts are enabled, so that is not the issue.

 

Also, in the Site settings under Web Designer Galleries, only two options are now there, where there was a list of options.

 

Has Microsoft made a change recently that would disable these?  I have made no changes in our admin centre.

 

I would be very grateful for any advice!

3 Replies

  • Margaret_D 

     

    I would guess that the have moved to the new way of saving document library as templates using site scripts!

     

    As the old way was made for classic SharePoint and probably has been deprecated:

     

     

    Use this script to create templates

     

     

    #Parameters
    $AdminCenterURL = "https://Contoso-admin.sharepoint.com"
    $ListURL = "https://Contoso.sharepoint.com/sites/supersecretsite/Secret"
    $TemplateName = "Secret Library"
    $TemplateDescription = "Document Library Template for Secrets"
    $TemplateThumbnail = "https://Contoso.sharepoint.com/SiteAssets/Super-Secret-template.jpg"
     
    #Connect to Admin Center
    Connect-SPOService -url $AdminCenterURL
     
    # Get the Template from the Library
    $ListTemplate = Get-SPOSiteScriptFromList -ListUrl $ListURL
     
    #Create a site script
    $SiteScript = Add-SPOSiteScript -Title $TemplateName -Description $TemplateDescription -Content $ListTemplate
     
    #Create a Site desing for the site script
    Add-SPOListDesign -Title $TemplateName -Description $TemplateDescription -SiteScripts $SiteScript.Id -Thumbnail $TemplateThumbnail -ListColor pink

     

     

     

    • Margaret_D's avatar
      Margaret_D
      Copper Contributor
      Thanks for your reply Nicolas, unfortunately I don't use PowerShell!
      I only save a library as a template a few weeks ago!

      • Margaret_D 

         

        Fully understandable!

        Unfortunately this is the currently only way for you to create Organizational Templates for Libraries. so if you want to use them on multiple sites, this is the way to do it

         

         

        If it's on the same site, you can choose the option "From existing Library", but that's it

         

         

Resources