Thanks everyone for your suggestions. Just for the record, here's what we finally did.
All the code went in the common.inc file. This snippet starts it out:
<?php
$breadcrumb = array(
"children" => "Children's Ministry",
"youth" => "Youth Ministry",
"newsletter" => "Newsletter",
"home" => "Home Page"
);
function commonHeader ($title) {
global $breadcrumb;
?>
Then, later on in the commonHeader section each page gets:
<?php
$urlstring = getenv('REQUEST_URI');
$urlstring = preg_replace("/^\/|\/$/", "", $urlstring);
$urlstring = preg_replace("/^zion\/home\/?/", "", $urlstring);
echo "<a href=\"/zion/home/\">Zion Home</a>";
$crumbs = preg_split("/\//", $urlstring);
$j = sizeof($crumbs);
if ($urlstring != "") {
for ($i=0; $i<$j; $i++) {
$crumb = $crumbs[$i];
if (($crumbname = $breadcrumb[$crumb]) == "")
$crumbname = $crumb;
if ($i == $j - 1) {
/* Current Page */
echo " --> $title";
}
else {
preg_match("/.*$crumb\/?/", getenv('REQUEST_URI'), $thisurl);
echo " --> <a href=\"$thisurl[0]\">", $crumbname, "</a>";
}
}
}
echo "<br><br>\n\n";
}
function commonFooter () {
?>
This goes a little over my head, but my programmer friend tells me this was the best way to do it in our instance.
Thanks,
Aaron