Main Points

Master Page Footer

The footer is almost completely contained in the ASP.NET master page. Only a few odd elements are required from the .aspx content page. The entire structure for the authorship and posting date sections are contained in the master page, as are the row titles. Only an <asp:contentplaceholder> tag to input the name of the person(s) who worked on the page and the dates they did it are drawing information from the content page. The structure of the subjects bar is also in the master page, with only the actual subjects being populated from the content page. And the entire contact form is inserted into the master page excepting only the C# code needed to make it work.

<!-- THIS IS THE FOOTER SECTION -->
<div id="footerWrapper">
<div id="footer">
<div id="pageInfoWrapper">
<div id="pageInfo">
...Footer sections...
</div>
</div>
<div id="pageInfoSpacer" class="spacer"></div>
</div>
</div>
<div id="footerSpacer" class="spacer"></div>

The structure of the footer is pretty simple. There are a couple nested divs... in fact, I think we removed some code that was previously present which resulted in a double set of divs. The pageInfo set can probably be removed. The following content appears within this wrapper.

Skip to Main Points

Authorship and Posting Info

The following code is the authorship section which appears first in the footer sections. It is immediately followed by the very similar posting info.

<!-- This Section is for the Authorship Info -->
<div id="authorshipWrapper">
<div id="authorship" class="authorship">
<div class="author">
<div class="authorTitle">
Author:
</div>
<div class="authorName">
<asp:contentplaceholder id="cphAuthorName" runat="server" />
</div>
</div>
<div class="author">
<div class="authorTitle">
Editor:
</div>
<div class="authorName">
<asp:contentplaceholder id="cphEditorName" runat="server" />
</div>
</div>
<div class="author">
<div class="authorTitle">
Proofreader:
</div>
<div class="authorName">
<asp:contentplaceholder id="cphProofreaderName" runat="server" />
</div>
</div>
<div class="author">
<div class="authorTitle">
Researcher(s):
</div>
<div class="authorName">
<asp:contentplaceholder id="cphResearcherName" runat="server" />
</div>
</div>
</div>
</div>
<div id="authorshipSpacer" class="spacer"></div>

The authorship section is a bit overbuilt. I have a feeling that with more advanced CSS skills this could be done lighter. However, the effect I was trying to achieve - and maybe should have used - was an HTML table. Tables are HTML heavy requiring triple tags, <table>, <tr>, and <td>. This HTML uses divs instead, however it requires triple nested divs that serve the same function as each table tag. There is one significant advantage to using the triple divs however. Table tags would lock this in the table structure, whereas I have more ability to restyle the table or drop the table structure entirely without altering the HTML. Each row has a title and an <asp:contentplaceholder> which inserts the name of the person who fulfilled that role. Here is the only information that needs to be pulled in from the .aspx content page...

<asp:content ContentPlaceHolderId="cphAuthorName" runat="server">
chroniclemaster1
</asp:content>

Each of the <asp:contentplaceholder> tags in the ASP.NET master page has a corresponding <asp:content> tag which contains only the name(s) of the people who've worked on the page, in this case the author. The posting info section is set up very similarly.

<!-- This Section is for the Posting Info -->
<div id="postingDatesWrapper">
<div id="postingDates">
<div class="posting">
<div class="postingType">
Date Received:
</div>
<div class="postingDate">
<asp:contentplaceholder id="cphDateReceived" runat="server" />
</div>
</div>
<div class="posting">
<div class="postingType">
First Posted:
</div>
<div class="postingDate">
<asp:contentplaceholder id="cphFirstPosted" runat="server" />
</div>
</div>
<div class="posting">
<div class="postingType">
Last Revised:
</div>
<div class="postingDate">
<asp:contentplaceholder id="cphLastRevised" runat="server" />
</div>
</div>
<div class="posting">
<div class="postingType">
Last Major Revision:
</div>
<div class="postingDate">
<asp:contentplaceholder id="cphLastMajorRevision" runat="server" />
</div>
</div>
</div>
</div>
<div id="postingDatesSpacer" class="spacer"></div>

The posting info is set up using the same table-like triple div technique used for the authorship section. It will come as no surprise that only the dates are pulled in from the content page...

<asp:content ContentPlaceHolderId="cphDateReceived" runat="server">
2008/01/19
</asp:content>

The result of this code once we apply our style sheet is a pair of tables that can be heavily altered later without touching the code. Only the stylesheets need to be rewritten to change the appearance. The next piece of code builds the subjects bar and the contact form.

Skip to Main Points
Continue to 4. Master Page Contact Form -->
<---- Jump back to Master Page Development