Added "current" functionality to tabs and made Wordpress use same tabs.php file
This commit is contained in:
		
							
								
								
									
										18
									
								
								tabs.php
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								tabs.php
									
									
									
									
									
								
							| @@ -1,9 +1,17 @@ | ||||
| <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> | ||||
| 		<?php | ||||
| 		$tabs = array("Home" => "/home/", | ||||
| 			"Projects" => "/projects/", | ||||
| 			"About" => "/about/", | ||||
| 			"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> | ||||
| </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user