The previous posts in this series covered the simple steps necessary to get the sample page layout and sample page into a new solution. It was all pretty simple, but at this point you need to be careful and pay attention. I can tell you from personal experience that if you mess up the page layout’s properties, you can break page editing in your site!
Start by switching to the import solution you created in Part 1 (or open it if necessary) and open the elements.xml file for the page layout in the editor. You will be pulling some, but not all, of this information over to the new solution. I have highlighted the pits you will need.
Switch back to the MyPublishingFeatures solution and edit the elements.xml file for the MyPageLayout feature. Start by editing the Module and File elements so that the Url and Type attributes are correct and so that the File element is not self-closing. The result should look like this:
Next, copy the Property elements highlighted above and paste them into the File element to match the following.
You are almost done with the page layout, but there is one critical step remaining! The Value attribute of the PublishingAssociatedContentType Property is formatted incorrectly. You must edit the value to match the following format:
In this case the Value becomes
Save your work. The page layout is done and you are now ready to take care of the publishing page which, unfortunately, is slightly more complicated.
Table of Contents
Author: Doug Ware