breadcrumb Class Reference

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

Definition at line 17 of file breadcrumb.php.


Member Function Documentation

breadcrumb::add ( title,
link = '' 
)
Parameters:
$title 
$link 

Definition at line 43 of file breadcrumb.php.

00043                                    {
00044     $this->_trail[] = array('title' => $title, 'link' => $link);
00045   }

breadcrumb::breadcrumb (  ) 

Definition at line 27 of file breadcrumb.php.

00027                         {
00028     $this->reset();
00029   }

breadcrumb::reset (  ) 

Definition at line 34 of file breadcrumb.php.

Referenced by breadcrumb().

00034                    {
00035     $this->_trail = array();
00036   }

breadcrumb::trail ( separator = ' - '  ) 
Parameters:
$separator 
Returns:
string

Definition at line 52 of file breadcrumb.php.

00052                                      {
00053     $trail_string = '';
00054 
00055     for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {
00056       if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {
00057         $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="breadCrumb">' . ((!_cst_bool('NOT_RECUP_CASSE_IN_TXT_CATEGORIES'))?strtolower($this->_trail[$i]['title']) : $this->_trail[$i]['title']) . '</a>';
00058       } else {
00059         $trail_string .= $this->_trail[$i]['title'];
00060       }
00061 
00062       if (($i+1) < $n) $trail_string .= $separator;
00063     }
00064 
00065     return $trail_string;
00066   }


Member Data Documentation

breadcrumb::$_trail [protected]

Definition at line 22 of file breadcrumb.php.


The documentation for this class was generated from the following file: