I create and edit my SharePoint project in Visual Studio 2008. We deploy the solution through the STSADM command line tool. I am creating a new PageLayout that is based of off a masterpage. I create the pagelayout as .aspx page add all the things I need to, then add the pagelayout to the PageLayouts.xml file, then build and deploy the solution. Once it has been deployed I go and look for the pagelayout in the masterpage gallery and its not listed there. I also checked by creating a new page and the pagelayout isnt listed their either. Finally I also verified that my feature was installed, and activated on the site. What should I look for to try and figure out why my pagelayouts are not being ghosted properly?
-
Are you using WSPBuilder to package your solution or doing all by yourself.– sssreddyCommented Jun 8, 2012 at 19:14
-
I am using WSPBuilder– atrljoeCommented Jun 8, 2012 at 19:53
-
Could you please post your PageLayouts.xml file code here?– Falak MahmoodCommented Jun 9, 2012 at 16:17
3 Answers
Deploying page layouts via features requires more than just adding the file to the gallery. You need to set properties on the file to set the content type and associated publishing content type. Depending on your needs, you may have a custom content type for the page.
However, if you can't see the file in the gallery after activation, it sounds like you have something wrong in either the PageLayouts.xml file or the feature.xml file. You'll need to post the contents of those files so we can have a look.
I have posted a solution to such problem earlier. Check if it helps you: How to update custom master page and page layout, which is already deployed