You would have seen several articles for creating page
layouts with custom content types. But in this article let us look how to
provision page layouts with multiple rich text fields.
Problem Statement: OOB publishing HTML field (Rich Field
Text Column) can be used to create the content type for page layouts manually.
But if you require more than one Rich Field Text Column, then we need to create
those publishing HTML field programmatically.
Create Page Layout with Rich HTML Fields:
The following are the points to be considered while creating
page layouts.
- Create Site Columns
- Create Site Content type
- Add Site Columns to the Content type
- Create Page Layout using the Content type.
This approach might be possible in multiple programming ways including PowerShell, CSOM PowerShell, CSOM, JSOM or REST API. But in the samples below, let us use PnP PowerShell for provisioning required components.