Project

General

Profile

« Previous | Next » 

Revision 294

Added by stefan over 18 years ago

Added parameter depth to show_breadcrumbs function to set the number of levels to be show.

View differences:

frontend.functions.php
181 181
}
182 182

  
183 183
if (!function_exists('show_breadcrumbs')) {
184
	function show_breadcrumbs($sep=' > ',$tier=1,$links=true) {
184
	function show_breadcrumbs($sep=' > ',$tier=1,$links=true,$depth=-1) {
185 185
		global $wb;
186 186
		$page_id=$wb->page_id;
187 187
		if ($page_id!=0)
......
191 191
			$counter=0;
192 192
			foreach ($bca as $temp)
193 193
			{
194
		        if ($counter>=($tier-1))
194
		        if ($counter>=($tier-1) AND ($depth<0 OR $tier+$depth>$counter))
195 195
		        {
196 196
					if ($counter>=$tier) echo $sep;
197 197
					$query_menu=$database->query("SELECT menu_title,link FROM ".TABLE_PREFIX."pages WHERE page_id=$temp");

Also available in: Unified diff