Changeset 497 for trunk/lib/Navigation.inc.php
- Timestamp:
- Sep 15, 2014 9:44:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Navigation.inc.php
r485 r497 254 254 // A crumb with no link. 255 255 $breadcrumbs[] = array( 256 'url' => false, 257 'title' => sprintf($this->getParam('last_crumb_format'), $page['title']) 256 'url' => $_SERVER['REQUEST_URI'], 257 'title' => sprintf($this->getParam('last_crumb_format'), $page['title']), 258 'class' => 'current' 258 259 ); 259 260 } else if ($crumb_count > $this->getParam('chop_breadcrumb_links')) { … … 261 262 $breadcrumbs[] = array( 262 263 'url' => $page['url'], 263 'title' => sprintf($this->getParam('last_crumb_format'), $page['title']) 264 'title' => sprintf($this->getParam('last_crumb_format'), $page['title']), 265 'class' => '', 264 266 ); 265 267 } … … 269 271 $breadcrumbs[] = array( 270 272 'url' => false, 271 'title' => $page['title'] 273 'title' => $page['title'], 274 'class' => 'unavailable', 272 275 ); 273 276 } else { … … 275 278 $breadcrumbs[] = array( 276 279 'url' => $page['url'], 277 'title' => $page['title'] 280 'title' => $page['title'], 281 'class' => '', 278 282 ); 279 283 } … … 334 338 } 335 339 340 /* 341 * 342 * 343 * @access public 344 * @param 345 * @return 346 * @author Quinn Comendant <quinn@strangecode.com> 347 * @version 1.0 348 * @since 07 Sep 2014 12:22:19 349 */ 350 public function getBreadcrumbsUL() 351 { 352 $breadcrumbs = $this->getBreadcrumbsArray(); 353 if (!empty($breadcrumbs)) { 354 ?><ul class="breadcrumbs"><?php 355 foreach ($breadcrumbs as $b) { 356 $printclass = '' != $b['class'] ? sprintf(' class="%s"', $b['class']) : ''; 357 printf('<li%s><a href="%s">%s</a></li>', $printclass, $b['url'], $b['title']); 358 } 359 ?></ul><?php 360 } 361 unset($key, $value); 362 } 363 336 364 /** 337 365 * Test if the given URI matches the URL of the current page. By default the URI is tested
Note: See TracChangeset
for help on using the changeset viewer.