Forum Discussion
Danny Foncke
Feb 16, 2017Copper Contributor
PnP Provisioning Engine template support for publishing pages ?
Is there any news on the support for publishing pages by the pnp provisioning engine. if this functionality is not for the near future, any suggestions on how best to complement the provisioning (...
paulpascha
Feb 16, 2017Bronze Contributor
You can provision Publishing Pages using PnP, see an example below:
<pnp:File src="mypublishingpage.aspx" Folder="{site}/Pages" Overwrite="true">
<pnp:Properties>
<pnp:Property Key="ContentTypeId" Value="{contenttypeid:MyPageContentType}" />
<pnp:Property Key="Title" Value="My Publishing Page" />
<pnp:Property Key="PublishingPageLayout" Value="{sitecollection}/_catalogs/masterpage/MyPageLayout.aspx, My Page Layout" />
</pnp:Properties>
</pnp:File>
In this example a Publishing page with the filename mypublishingpage.aspx is provisioned to the pages library using the specified Content Type and Page Layout.
Are there any specific challenges you face when provisioning Publishing Pages?