Deploying Publishing Page from Page Layout in Another Feature

This post is a sequel to the article Deploying Publishing Page Layouts and Pages Using Features in which we examined the step-by-step process of deploying publishing pages based on a page layout using SharePoint features. As we saw, apart from a few caveats, that approach was quite straightforward and beneficial, allowing us to easily move a solution between environments.

However, the previous solution had one disadvantage – the page layout and the publishing page itself were deployed within the same feature. While this works for our small sample, it is not the cleanest approach for a real-life project.

In an end-user solution it is better to package page layouts in one feature and publishing pages in another. This way we are able to deploy content separately to development or QA environments for testing purposes and a clean solution without content to production.

In the end we would like to re-structure the solution to look like this:

Page Layouts Solution Structure

Continue reading