When you just need to overwrite settings from a pagelayout, sometimes for javascript settings, sometimes to customise standard styling.

Whatever your reason is here’s a simple way to do that, keep in mind that you need to change YourID in the snippets and change it to something logical and identical on both YourID’s:

Paste this in your masterpage:

<asp:ContentPlaceHolder id="YourID" runat="server">
 // PUT YOUR CODE HERE. THIS CODE WIL ALLWAYS RUN TILL OVERWRITTEN BY PAGELAYOUT WITH SAME ID
 </asp:ContentPlaceHolder>

The next line will be pasted in the pagelayout. I don’t want the masterpage code to run, or i want the code to do someting else. For example im giving the BODY a different background color when this pagelayout is set.

<asp:Content runat="server" ContentPlaceHolderID="YourID">
 <style>
 body { background-color: #cee1e7;}
 </style>
 </asp:Content>

(for the above example. If this is the reason (background- color) your using it. Dont forget to the !important tag to override standard CSS styling)

There are different things you can use this for. For example: i needed IE8 compatibility for a pagelayout in editmode. The rest i wanted IE9 to be loaded.

your masterpage:

<asp:ContentPlaceHolder id="AdditionalMetaTags" runat="server">
 <PublishingWebControls:EditModePanel ID="EditModePanel1" runat="server" PageDisplayMode="Display">
 <meta http-equiv="X-UA-Compatible" content="IE=9" />
 </PublishingWebControls:EditModePanel>
 </asp:ContentPlaceHolder>

And now for your pagelayout:

<asp:Content runat="server" ContentPlaceHolderID="AdditionalMetaTags">
 <PublishingWebControls:EditModePanel ID="EditModePanel2" runat="server" PageDisplayMode="Display">
 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
 </PublishingWebControls:EditModePanel>
 </asp:Content>

Now youll see that this pagelayout will emulate IE8 compatibility as for the rest of your site IE9 will be set.