iMadalina
Updating page layouts is a tricky business. And because changes to how a page looks or to the content type are inevitable, at some point you will face this problem.
First of all, to be able to update page layouts, you must make sure they are ghosted. So, after creating them in SharePoint designer, you should remove the following attributes from the Page directive:
meta:webpartpageexpansion=”full” meta:progid=”SharePoint.WebPartPage.Document”
These attributes tell SharePoint that the layout has been modified in the interface and, as a result, the layout will appear as unghosted after it is deployed, even if it has never been opened with SharePoint Designer.
Second, you must make sure that everybody understands that modifying a page layout in SharePoint designer will cause it to become unghosted.
If all the conditions above are fulfilled, then a consecutive deployment of an updated page layout (through a wsp package) will be visible across site collections without any additional actions (feature reactivation, SPD manual work).
True? False.
There is one case when an untouched layout will not get updated through deployment: when the page layout inherits a content type that is instantiated in the site – more precisely when the columns of the content type are visible, editable and have been filled with data on the page instance(s).
In this case, the page layout will appear as unghosted after a page instance has been created and it will not get updated at deployment.
The solution is to reset the page layout to its site definition.
There are more than one ways of doing this, all of them detailed very nicely here. The easiest one is in the interface: Site Settings – Reset To Site Definition on the root web of a site collection.
A drawback to this approach may appear: if your page layout contains web parts that are added to the page when it is created, then resetting to site definition will cause the pages that inherit that layout to have 2 instances of that web part. That happens because SharePoint does what you would have to do manually when it resets to site definition, if resetting to site definition option would not exist:
- it detaches the page from its layout
- it copies the new layout content over the old layout, making it unghosted (identical to the SharePoint root version)
- and then it attaches the page back to its layout and, as a result, reapplies the layout to the page