[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: breadcrumb.php 3 2006-05-27 04:59:07Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Released under the GNU General Public License 11 */ 12 13 class breadcrumb { 14 var $_trail; 15 16 function breadcrumb() { 17 $this->reset(); 18 } 19 20 function reset() { 21 $this->_trail = array(); 22 } 23 24 function add($title, $link = '') { 25 $this->_trail[] = array('title' => $title, 'link' => $link); 26 } 27 28 function trail($separator = ' - ') { 29 $trail_string = ''; 30 31 for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) { 32 if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) { 33 $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>'; 34 } else { 35 $trail_string .= $this->_trail[$i]['title']; 36 } 37 38 if (($i+1) < $n) $trail_string .= $separator; 39 } 40 41 return $trail_string; 42 } 43 } 44 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |