[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/template/inc_script/frontend_render/disabled/ -> breadcrumb.php (source)

   1  <?php
   2  
   3  /**
   4   * Alternative way of building a breadcrumb
   5   * It will show article title too and act different when in article list mode
   6   * This works different from default breadcrumb because it is level based
   7   *
   8   * (c) 07/12/2009 Oliver Georgi
   9   */
  10  
  11  if(strpos($content['all'], '{BREADCRUMB_ARTICLE}')) {
  12  
  13      // Set level where to start with breadcrumb - default 0 = Root level
  14      $_breadcrumb_start_level    = 0;
  15      
  16      // Separate Breadcrumb items with
  17      $_breadcrumb_spacer            = ' &gt; ';
  18      
  19      // Wrap inner link text by prefix/suffix <a> %PREFIX% Linktext %SUFFIX% </a>
  20      $_breadcrumb_link_prefix    = '<b>';
  21      $_breadcrumb_link_suffix    = '</b>';
  22      
  23      // additional link attributes like class, rel, style
  24      // remember there is no active link - active (last) item has no link
  25      $_breadcrumb_link_attribute    = 'class="breadcrumb-link"';
  26      
  27      
  28      ////// Do not edit below ////////
  29      
  30      $_breadcrumb = array();
  31      
  32      if(count($LEVEL_ID) > $_breadcrumb_start_level) {
  33  
  34          foreach($LEVEL_ID as $level => $item) {
  35              
  36              if($level < $_breadcrumb_start_level) {
  37                  continue;
  38              }
  39  
  40              if($content['struct'][$item]["acat_hidden"] == false) {
  41                  $_breadcrumb[] = getStructureLevelLink( 
  42                          ($content['cat_id'] == $item && $content['list_mode']) ? $content['struct'][$item]['acat_name'] : $content['struct'][$item], 
  43                          $_breadcrumb_link_attribute, 
  44                          $_breadcrumb_link_prefix, 
  45                          $_breadcrumb_link_suffix
  46                      );
  47              }
  48          
  49          }
  50      
  51      }
  52      
  53      // Article
  54      if($aktion[1]) {
  55      
  56          $_breadcrumb[] = html_specialchars( $content['article_title'] );
  57      
  58      }
  59      
  60      $_breadcrumb = implode($_breadcrumb_spacer, array_diff( $_breadcrumb , array('', NULL) ) );
  61      
  62      $content['all'] = str_replace('{BREADCRUMB_ARTICLE}', $_breadcrumb, $content['all']);
  63  
  64  }
  65  
  66  ?>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7