View Single Post
Old 06-14-2008, 10:47 PM   #1 (permalink)
Aaron
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default Breadcrumb Navigation?

Yeah... It just doesn't feel like this is the right way.

I serialize an array of the home/category/.../page breadcrumbness, and then I do this... It just doesn't seem like the right method. Any help?
PHP Code:
// Develop the breadcrumb Navigation
  
public function getLocation($location) {
  
  
//Unserialize the location array.
  
$location unserialize($location);
  
$return ' ';
  foreach (
$location as $url => $title) {
    if (
$url != 'current') {
      if (
$url == ROOT) {
          
$title '<img src="'.ROOT.'resources/images/house_go.gif" alt="Go to the home page" />';
      }
      
$return .= '<a href="' $url '">' $title '</a> » ';
    }
    else {
      
// Caps insensitive
      
if (strtolower($title) == 'home'){
          return 
'<img src="'.ROOT.'resources/images/house.gif" alt="You are at the home page" />';
      }
      
$return .= $title;
    }
  }
  return 
$return
  } 
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote