Composite Apps - SPD and Content Pages

Now that we've seen how Master Pages work, let's look at a content page and see how it relates to a Master Page.  We'll start by opening the default.aspx page in SharePoint Designer.  When you open the page the first thing you'll notice is that SharePoint Designer loads the Master Page.  Because your site can have multiple Master Pages defined, the attached Master Page URL is displayed in the top-right corner:

image

Once the page loads you should see a view that is very similar to your Master Page, again containing purple rectangles signifying content placeholders:

image

As you move your mouse over the page you'll notice that several areas of the page are not editable.  These are areas that are defined in the Master Page.  Some areas can be overridden, one example is the PlaceHolderLeftNavBarTop content placeholder:

image

It is defined in the Master Page so it displays but it does not have any content associated with it.  By clicking on the image "arrow" (still looking for the name of that..) you are given the option to create custom content:

image

If we take a look at the PlaceHolderMain, you'll notice that it is editable (and also, not blank):

image

By switching into code view you can see that the placeholder has already been overridden and new content is defined inside of the asp:Content control:

image

You'll also notice that the default.aspx page is considerably smaller than the content would suggest.  That is because most of the layout is configured in the .master page which means only the overridden sections need to be defined on the content page.


Posted 02-04-2008 8:15 AM by Raymond Mitchell
Inetium, LLC. Site Information