1
0

tabs.php: made class="current" part only work for aclindsay.com base domain (not acal.aclindsay.com)

This commit is contained in:
Aaron Lindsay 2011-03-22 11:32:57 -06:00
parent a40bbc33a5
commit c7bd13baf5

View File

@ -8,8 +8,10 @@
"Projects" => "/projects/", "Projects" => "/projects/",
"Resume" => "/resume/" "Resume" => "/resume/"
); );
$base_domain = $_SERVER['HTTP_HOST'] == "aclindsay.com";
foreach ($tabs as $name => $url) { foreach ($tabs as $name => $url) {
if ($url == $_SERVER['REQUEST_URI']) if ($base_domain && $url == $_SERVER['REQUEST_URI'])
echo "<li><a href=\"http://aclindsay.com".$url."\" class=\"current\">".$name."</a></li>"; echo "<li><a href=\"http://aclindsay.com".$url."\" class=\"current\">".$name."</a></li>";
else else
echo "<li><a href=\"http://aclindsay.com".$url."\">".$name."</a></li>"; echo "<li><a href=\"http://aclindsay.com".$url."\">".$name."</a></li>";