Approximating Master Pages in PHP


<title><?php echo $pagetitle; ?></title>
<body style="margin-top:20px;margin-left:20px;margin-right:20px;">
<table width="100%" border="0" cellpadding="10" cellspacing="0"border="0">
<tr bgcolor="#33FFFF">
<td colspan="5"><h2>Template Specific Header</h2></td>
<tr bgcolor="#EEEEEE">
<td nowrap><a href=#">Navigation Link 1</a></td>
<td nowrap><a href="#">Navigation Link 2</a></td>
<td nowrap><a href="#">Navigation Link 3</a></td>
<td nowrap><a href="#">Navigation Link 4</a></td>
<td width="100%">&nbsp;</td>
<table width="100%" cellpadding="10" cellspacing="0" border="0">
<td width="30%" valign="top" bgcolor="#EEEEEE"><strong>Template Specific
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
<td width="70%" valign="top"><?php
echo $pagemaincontent;
<table width="100%" cellspacing="0" cellpadding="10" border="0">
<td colspan="2" bgcolor="#33FFFF">Template Specific Footer</td>
  //Buffer larger content areas like the main page content
<em>Page Specific Content Text</em>
  Lorem ipsum dolor sit amet, consectetuer adipiscing
  elit, sed nonummy nibh euismod tincidunt ut laoreet
  dolore magna aliat volutpat. Ut wisi enim ad minim
  veniam, quis nostrud exercita ullamcorper
  suscipit lobortis nisl ut aliquip ex consequat.
  Duis autem vel eum iriure dolor in hendrerit in
  vulputate velit molestie consequat, vel illum
  dolore eu feugiat nulla facilisis ats eros et
  accumsan et iusto odio dignissim qui blandit
  prasent up zzril delenit augue duis dolore te
  feugait nulla facilisi. Lorem euismod tincidunt
  erat volutpat.
  //Assign all Page Specific variables
  $pagemaincontent = ob_get_contents();
  $pagetitle = "Page Specific Title Text";
  //Apply the template



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: