tabs.php: Made it so that sub-pages get same tab-overline treatment as top-level ones
This commit is contained in:
parent
f136a43e12
commit
9a87850a38
7
tabs.php
7
tabs.php
@ -11,7 +11,12 @@
|
|||||||
$base_domain = $_SERVER['HTTP_HOST'] == "aclindsay.com";
|
$base_domain = $_SERVER['HTTP_HOST'] == "aclindsay.com";
|
||||||
|
|
||||||
foreach ($tabs as $name => $url) {
|
foreach ($tabs as $name => $url) {
|
||||||
if ($base_domain && $url == $_SERVER['REQUEST_URI'])
|
if ($url == "/") {
|
||||||
|
if ($_SERVER['REQUEST_URI'] == "/")
|
||||||
|
echo "<li><a href=\"http://aclindsay.com/\" class=\"current\">Home</a></li>";
|
||||||
|
else
|
||||||
|
echo "<li><a href=\"http://aclindsay.com/\">Home</a></li>";
|
||||||
|
} else if ($base_domain && strncmp($url, $_SERVER['REQUEST_URI'], strlen($url)) == 0)
|
||||||
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>";
|
||||||
|
Loading…
Reference in New Issue
Block a user