for example...
class pageTemplate() {
function useTemplate($path)
This function loads a template
function registerKey($key, $value)
This function sets an array $array[$key] = $value
function renderPage()
This basically does an echo $this-returnPage();
exit;
function returnPage()
This function replaces all instances of each
key in the array with their respective values
and returns the composite
function renderError($errorCode)
Builds an error reporting page and prints the
$errorCode
So, it's pretty simple really. You can even use this to build menus from menu templates, and then plug that content into your page template.
The examples are in pseudo php btw. :) If you want further examples, you can email me (johnston@megaepic.com)
By the way, sorry for the non-indenting. I'm not sure how to tab stuff in on here. Ideas?