The Power of PlaceHolders
Everyone knows about the wonders of masterpages and stylesheets but one of the simpler and more prominent components used in SharePoint that is forgotten about is the ASP placeholder controls that power what gets displayed in certain pages, and in certain areas of the page.
As always I am a huge fan of SharePoint designer so I am going to talk about this from the SharePoint Designer perspective (however you can do the same work in Visual Studio or the editor of your choice).
First of all you can edit any of the existing SharePoint placeholders on any page in a number of different ways. The SharePoint Designer supported ways are listed here: http://office.microsoft.com/en-us/sharepointdesigner/HA101651201033.aspx
What this means is that it is very easy to customize the individual display of various page elements without having to create new master pages, or large style sheets. This is especially helpful when you have only a few pages that have minor differences. Rather than creating an entirely new masterpage because the structure is different you can just adjust the structure of an individual section of that master page.
Now add the fact that you can create your own placeholders very easily and it basically means you can create one master page that can be dynamic in the sense that it changes based on the page layouts and page content, since the page layouts and page content can describe the value of the placeholder controls.
Add the following to any of your master pages.
<asp:ContentPlaceHolder ID=“MyVeryOwnPlaceHolder” runat=”server”>
Now add the following to any page layout or directly to the page using SharePoint designer (and the methods described in that linked article)
<asp:Content ContentPlaceholderID=”MyVeryOwnPlaceHolder” runat=”server”>
This is <h1>my</h1> very own <b>placeholder control!<b>
Save and load up your page and you should see the html you put into that place holder appear ONLY in the page where you have the asp:Content overriding the placeholders default content.
Hope you liked the tip,