Forum Discussion
irshad313
Feb 07, 2024Copper Contributor
Publishing a page template
I created a page template in one of the site and distributed that page template to all the active communication sites through powershell [as a page template]. but the issue is minor version of a temp...
- Feb 09, 2024Thanks for replies, I have achieved my objective with this scripts
$sites = Get-PnPTenantSite -Template SITEPAGEPUBLISHING#0
foreach($site in $sites)
{
Connect-PnPOnline -Url $site.Url -Interactive
Set-PnPPage -Identity “Templates/Page-From-TemplateTest.aspx” -Publish
}
Susan_Hanley
Feb 07, 2024MVP
Are you sure you want to do this? By default, page templates stay in "minor version" mode so that they are only visible to editors and not readers. You still get the functionality of the template, but it remains in a "never published" state.
irshad313
Feb 09, 2024Copper Contributor
Yes I want to publish this, because the requirement was to create a template based out of a Published templated [From other site]. I was able to copy templated from site to all other sites but those templates are not available for users to use because of the minor version.