Associate
how's it going folks.
i've been given a task to cleaning up a website that was written about 3-4 years ago.
the site structure looks like this.
now each folder (about, history etc.) has the exact same html code at the top for example.
i want to be able to create a header.php file that includes all this html code, but takes the directory name of that folder and uses that directory name inside the title tag of the html.
i've been given a task to cleaning up a website that was written about 3-4 years ago.
the site structure looks like this.
Code:
html
+----about
+----history
+----index.php (site.com/about/history/)
+----index.php (site.com/about/)
+----contact
+----index.php (site.com/contact/)
+----downloads
+----index.php (site.com/downloads/)
etc.etc.
now each folder (about, history etc.) has the exact same html code at the top for example.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<?php include("../../i/metas.php"); ?>
<title>Development Education Explored | DevelopmentEducation.ie</title>
<link rel="stylesheet" type="text/css" href="../../c/titles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../../c/all.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="../../c/other.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../../j/niftyCorners.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../../c/print_all.css" media="print"/>
<link rel="stylesheet" type="text/css" href="../../c/print_other.css" media="print" />
<script type="text/javascript" src="../../j/swfobject.js"></script>
<script type="text/javascript" src="../../j/niftycube.js"></script>
<script type="text/javascript">
window.onload=function(){
Nifty("div.green","normal");
Nifty("div.dkgrey","normal");
Nifty("div.ltgrey","normal");
}
</script>
</head>
<body>
<a name="top"></a>
<div id="cnt">
<div id="top"><?php include("{$pa}i/logo.php"); ?>
<div id="topmenu">
<ul>
<li class="on"><a href="../../about/">About</a></li>
<li><a href="../../partners/">Partners</a></li>
<li><a href="../../glossary/">Glossary</a></li>
<li><a href="../../contact/">Contact</a></li>
<li><a href="http://www.developmenteducation.ie/sitemap">Site Map</a></li>
</ul>
<?php include("{$pa}i/googlesearch.php"); ?>
</div>
<div id="menu">
<ul>
<li class="list1"><a id="item1" href="../../" title="Home">Home</a></li>
<li class="list2"><a id="item2" href="../../issues/" title="Issues and Topics">Issues & Topics</a></li>
<li class="list3"><a id="item3" href="../../resources/" title="Links and Resources">Links & Resources</a></li>
<li class="list4"><a id="item4" href="../../galleries/" title="Cartoons and Photos">Cartoons & Photos</a></li>
<li class="list5"><a id="item5" href="../../action/" title="Taking Action">Taking Action</a></li>
<li class="list6"><a id="item6" href="../../book/" title="80:20 The Book">80:20 The Book</a></li>
<li class="list7"><a id="item7" href="../../teachers/" title="Teachers and Educators">Teachers & Educators</a></li>
<li class="list8"><a id="item8" href="../../shop/" title="Shop">Shop</a></li>
</ul>
</div>
</div>
i want to be able to create a header.php file that includes all this html code, but takes the directory name of that folder and uses that directory name inside the title tag of the html.