#native_company# #native_desc#

Yahoo style parent folder navigation links

By sigildark
on July 6, 2001

Version: 1.0

Type: Full Script

Category: HTML

License: GNU General Public License

Description: Include for parent folder links

//set the root of your site

//take into a variable each path element
$url = explode("/", $PHP_SELF);

//define the block variable
static $block;

//count the elements and discard (-1) the last which is the file
$counter = count($url)-1;

//set internal loop counter value to 1 cause $url[0] is empty

//this prints out the home link (array $url[0] does not contain the root element, so we must create it manually
echo "<a href='".$root."'>home</a> > ";

//loop start
//get each element of the array...
	$toc =$url[$n];
//and recursively add the element to re-create the complete path
//print out the result
	echo "<a href='".$block."'>".$url[$n]."</a> > ";
//increment the counter