Page Layout Publishing feature Page Attribute issue

Page layouts can be published and deployed using features. Doing the same using features has advantage as compared to publishing the same using SharePoint Designer. Andrew has a very good post on the same. https://www.andrewconnell.com/blog/archive/2006/12/20/5451.aspx .

Use the above link to understand steps involved in creating a Feature and Deploying the same using a feature.

Although you might still deploy the Page Layout using features and solution deployment you still need SPDesigner assistance to create the page.( without saving the same to Content DB). One thing to remember after creating the page using SPDesigner is to remove some additional Page attributes that the designer injects. These attributes cause the page to become unghosted. Before you deploy the page layout created using SPD and deployed using  Features and Solution deployment  ensure that your page attribute is as follows.

<%@ Page language="C#"   Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,

PublicKeyToken=71e9bce111e9429c"%>