Provision publishing page with the search results page layout with pnp provisioning powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-200561%22%20slang%3D%22en-US%22%3EProvision%20publishing%20page%20with%20the%20search%20results%20page%20layout%20with%20pnp%20provisioning%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-200561%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20SharePoint%202013%20on%20prem.%20I%20am%20using%20the%20powershell%26nbsp%3Bpnp%20provisioning%26nbsp%3Ba%20lot%20for%20many%20projects%20and%20it%20works%20great.%20I%20know%20how%20to%20provision%20publishing%20pages.%20But%20at%20this%20moment%20I%20would%20like%20to%20use%20the%20OOTB%20pagelayout%20%22Search%20Results%22%26nbsp%3B%26nbsp%3Bwhich%20is%20associated%20to%20the%20contenttype%20%22Welcome%20Page%22.%20When%20I%20provision%20my%20pnp%20template%20I%20see%20the%20new%20publishing%20page.%20It%20has%20the%20correct%20pagelayout%2C%20but%20the%20contenttype%20is%20incorrect.%20I%20see%20another%20contenttype%20(default%20contenttype).%20What%20could%20be%20the%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20pnp%20template%20part%20where%20I%20try%20to%20provision%20the%20publishing%20page%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AFiles%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%3C!--Search--%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AFile%3C%2FSPAN%3E%20%3CSPAN%3ESrc%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22Search.aspx%22%3C%2FSPAN%3E%20%3CSPAN%3EFolder%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22%7Bsite%7D%2FPages%22%3C%2FSPAN%3E%20%3CSPAN%3EOverwrite%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22true%22%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AProperties%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AProperty%3C%2FSPAN%3E%20%3CSPAN%3EKey%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22ContentTypeId%22%3C%2FSPAN%3E%20%3CSPAN%3EValue%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22%7Bcontenttypeid%3AWelcome%20Page%7D%22%3C%2FSPAN%3E%20%3CSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AProperty%3C%2FSPAN%3E%20%3CSPAN%3EKey%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22Title%22%3C%2FSPAN%3E%20%3CSPAN%3EValue%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22Zoeken%22%3C%2FSPAN%3E%20%3CSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%26lt%3B%3C%2FSPAN%3E%3CSPAN%3Epnp%3AProperty%3C%2FSPAN%3E%20%3CSPAN%3EKey%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22PublishingPageLayout%22%3C%2FSPAN%3E%20%3CSPAN%3EValue%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%22%7Bsitecollection%7D%2F_catalogs%2Fmasterpage%2FSearchResults.aspx%2C%20Zoekresultaten%22%3C%2FSPAN%3E%20%3CSPAN%3E%2F%26gt%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Epnp%3AProperties%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Epnp%3AFile%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3E%3CSPAN%3Epnp%3AFiles%3C%2FSPAN%3E%3CSPAN%3E%26gt%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20face%3D%22Consolas%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-200561%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

I am using SharePoint 2013 on prem. I am using the powershell pnp provisioning a lot for many projects and it works great. I know how to provision publishing pages. But at this moment I would like to use the OOTB pagelayout "Search Results"  which is associated to the contenttype "Welcome Page". When I provision my pnp template I see the new publishing page. It has the correct pagelayout, but the contenttype is incorrect. I see another contenttype (default contenttype). What could be the issue?

 

Here is pnp template part where I try to provision the publishing page:

<pnp:Files>
        <!--Search-->
        <pnp:File Src="Search.aspx" Folder="{site}/Pages" Overwrite="true">
          <pnp:Properties>
            <pnp:Property Key="ContentTypeId" Value="{contenttypeid:Welcome Page}" />
            <pnp:Property Key="Title" Value="Zoeken" />
            <pnp:Property Key="PublishingPageLayout" Value="{sitecollection}/_catalogs/masterpage/SearchResults.aspx, Zoekresultaten" />
          </pnp:Properties>
        </pnp:File>
      </pnp:Files>
 
0 Replies