My first article I have explained about a creation of Basic Share Point Page Layout.
http://melick-rajee.blogspot.com/2018/07/sharepoint-2016-create-custom-layout.html
By referring above article you can create a simple Page Layout as below.
<%@ Page Language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage, Microsoft.SharePoint.Publishing,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"> <SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Themable/Core Styles/pagelayouts15.css %>" runat="server"/> <PublishingWebControls:EditModePanel runat="server"> <!-- Styles for edit mode only--> <SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Themable/Core Styles/editmode15.css %>" After="<% $SPUrl:~sitecollection/Style Library/~language/Themable/Core Styles/ pagelayouts15.css %>" runat="server"/> </PublishingWebControls:EditModePanel> <style type="text/css"> <!-- Styles --> </style> <script type="text/javascript"> // your code </script> </asp:Content> <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"> <SharePointWebControls:FieldValue FieldName="Title" runat="server"/> </asp:Content> <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> <WebPartPages:WebPartZone runat="server" Title="Top Left" ID="TopLeftZone"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </asp:Content>
Copy this template file and save it as SimplePage.aspx.
Upload the Content Template
First, Navigate to Site Settings
Then find the Web Designer Galleries and go to Mater Pages and page Layouts
Then Upload document and choose the file that you have saved previously.
Then, You need to choose correct content Type.
It should be PageLayout and you can Map with any Content Type. For an Example, I will be mapped with Article Page.
After that, Save the page and don’ forget to publish the page.
Now we are ready to use the new page layout.
go to the Pages Library and try to create a New Page. You will see your content type listed there.
Comments