How to share page templates in Modern Communication Sites?

%3CLINGO-SUB%20id%3D%22lingo-sub-1171665%22%20slang%3D%22en-US%22%3EHow%20to%20share%20page%20templates%20in%20Modern%20Communication%20Sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1171665%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20would%20like%20to%20know%20if%20I%20can%20export%20a%20page%20template%20from%20a%20modern%20communication%20site%20and%20import%20it%20to%20a%20different%20one.%20I've%20seen%20that%20I%20can%20generate%20one%20template%20by%20saving%20the%20page%20as%20template%20and%20then%20when%20I%20create%20a%20new%20page%20I'm%20able%20to%20select%20it%20and%20create%20from%20it.%20Nevertheless%2C%20I%20would%20like%20to%20know%20if%20I%20can%20put%20that%20template%20in%20a%20different%20communication%20site%20so%20I%20don't%20have%20to%20create%20again%20manually%20across%20all%20my%20sites.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tested%20the%20following%20things%3A%3C%2FP%3E%3COL%3E%3CLI%3EDownload%20the%20.aspx%20of%20the%20page%20template%20and%20tried%20to%20import%20it%20to%20different%20SitePages%20library%2C%20but%20I%20got%20an%20%22Access%20Denied%22%20message%2C%20eventhough%20I%20executed%20the%20following%20sentence%3A%26nbsp%3B%3CEM%3ESet-SPOSite%20-Identity%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3E%3CSTRONG%3E%3CEM%3E%3CSITE%20url%3D%22%22%3E%3C%2FSITE%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3CEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-DenyAddAndCustomizePages%20%24false%3C%2FEM%3E%26nbsp%3B%3C%2FLI%3E%3CLI%3ETried%20to%20import%20it%20using%20Sharepoint%20Designer%20but%20got%20the%20same%20%22Access%20Denied%22%20message%3C%2FLI%3E%3CLI%3ETried%20to%20import%20it%20using%20PnP%20with%20Add-PnpFile%20method%20but%20got%20the%20same%20Access%20Denid%20message%3C%2FLI%3E%3CLI%3ECreate%20a%20Hub%20site%20with%20a%20template%20and%20associate%20another%20site%20to%20it%2C%20expecting%20that%20the%20hub%20site%20share%20page%20templates%2C%20but%20it%20don't%20share%20it%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20solution%20that%20can%20work%20for%20me%20is%20to%20create%20a%20SiteScript%20with%20those%20pages%20layout%2C%20but%20it%20seems%20that%20is%20not%20possible%20at%20the%20moment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20workaround%20that%20I%20can%20do%20to%20do%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1171665%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emodern%20sites%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

Hi,

I would like to know if I can export a page template from a modern communication site and import it to a different one. I've seen that I can generate one template by saving the page as template and then when I create a new page I'm able to select it and create from it. Nevertheless, I would like to know if I can put that template in a different communication site so I don't have to create again manually across all my sites.

 

I've tested the following things:

  1. Download the .aspx of the page template and tried to import it to different SitePages library, but I got an "Access Denied" message, eventhough I executed the following sentence: Set-SPOSite -Identity <Site URL> -DenyAddAndCustomizePages $false 
  2. Tried to import it using Sharepoint Designer but got the same "Access Denied" message
  3. Tried to import it using PnP with Add-PnpFile method but got the same Access Denid message
  4. Create a Hub site with a template and associate another site to it, expecting that the hub site share page templates, but it don't share it

 

Another solution that can work for me is to create a SiteScript with those pages layout, but it seems that is not possible at the moment.

 

Any workaround that I can do to do it?

 

Thanks in advance

0 Replies