Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r2164 r2175  
    304304     } 
    305305 
    306      public static function breadcrumb($elements=null,$with_home_link=true,$echo=false) 
    307      { 
     306     public static function breadcrumb($elements=null,$options=array()) 
     307     { 
     308          $with_home_link = isset($options['home_link'])?$options['home_link']:true; 
     309          $hl = isset($options['hl'])?$options['hl']:true; 
     310          $hl_pos = isset($options['hl_pos'])?$options['hl_pos']:-1; 
    308311          // First item of array elements should be blog's name, System or Plugins 
    309312          $res = '<h2>'.($with_home_link ? 
     
    311314               '<img src="style/dashboard-alt.png" alt="" />'); 
    312315          $index = 0; 
     316          if ($hl_pos < 0) { 
     317               $hl_pos = count($elements)+$hl_pos; 
     318          } 
    313319          foreach ($elements as $element => $url) { 
     320               if ($hl && $index == $hl_pos) { 
     321                    $element = sprintf('<span class="page-title">%s</span>',$element); 
     322               } 
    314323               $res .= ($with_home_link ? ($index == 1 ? ' : ' : ' &rsaquo; ') : ($index == 0 ? ' ' : ' &rsaquo; ')). 
    315324                    ($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 
     
    317326          } 
    318327          $res .= '</h2>'; 
    319           if ($echo) { 
    320                echo $res; 
    321           } 
    322328          return $res; 
    323329     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map