Added "current" functionality to tabs and made Wordpress use same tabs.php file
This commit is contained in:
parent
e2e9e81fd4
commit
12d663cba6
@ -23,17 +23,7 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="header-inner">
|
<div id="header-inner">
|
||||||
<div id="title"><a href="http://aclindsay.com">aclindsay.com</a></div>
|
<div id="title"><a href="http://aclindsay.com">aclindsay.com</a></div>
|
||||||
|
<?php include("/home1/aclindsa/public_html/tabs.php"); ?>
|
||||||
<div id="tabs">
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://aclindsay.com/home/">Home</a></li>
|
|
||||||
<li><a href="http://aclindsay.com/projects/">Projects</a></li>
|
|
||||||
<li><a href="http://aclindsay.com/about/">About</a></li>
|
|
||||||
<li><a href="http://aclindsay.com/resume/">Resume</a></li>
|
|
||||||
<li><a href="http://aclindsay.com/contact/">Contact</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
18
tabs.php
18
tabs.php
@ -1,9 +1,17 @@
|
|||||||
<div id="tabs">
|
<div id="tabs">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="http://aclindsay.com/home/">Home</a></li>
|
<?php
|
||||||
<li><a href="http://aclindsay.com/projects/">Projects</a></li>
|
$tabs = array("Home" => "/home/",
|
||||||
<li><a href="http://aclindsay.com/about/">About</a></li>
|
"Projects" => "/projects/",
|
||||||
<li><a href="http://aclindsay.com/resume/">Resume</a></li>
|
"About" => "/about/",
|
||||||
<li><a href="http://aclindsay.com/contact/">Contact</a></li>
|
"Resume" => "/resume/",
|
||||||
|
"Contact" => "/contact/");
|
||||||
|
foreach ($tabs as $name => $url) {
|
||||||
|
if ($url == $_SERVER['REQUEST_URI'])
|
||||||
|
echo "<li><a href=\"http://aclindsay.com".$url."\" class=\"current\">".$name."</a></li>";
|
||||||
|
else
|
||||||
|
echo "<li><a href=\"http://aclindsay.com".$url."\">".$name."</a></li>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user