Forum Discussion
PnP Provisioning Engine template support for publishing pages ?
Can you point to a sample set of files (template.xml and any others needed) to deploy a publishing page? I am trying to do it using the <pnp:File>, but I get an ArgumentNullException related to the "stream" parameter of the "Microsoft.SharePoint.Client.FileFolderExtensions.UploadFile" using an XML structure very similar to that which you provide (btw - typo in the "src" attribute - should be "Src").
Do I need a local file matching the "Src" attribute for upload. Perhaps with the TemplateRedirect content in it?
<%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage, Microsoft.SharePoint.Publishing,Version=15.0.0.0,Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %>
FYI...I put a file with the name matching the Src in the same directory as the template XML file and filled it with the TemplateRedirect stuff. That seems to do the trick! I even pushed with a ScriptEditor web part also!