Blame view

local/templates/main/components/bitrix/breadcrumb/.default/template.php 747 Bytes
80576aee7   Дмитрий Типикин   Интеграция верстк...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  <?php
  if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
  
  /**
   * @global CMain $APPLICATION
   */
  
  global $APPLICATION;
  
  //delayed function must return a string
  if(empty($arResult))
      return "";
  $strReturn = '';
  
  
  $strReturn .= '<div class="breadcrumbs"><div class="container breadcrumbs__container">';
  
  $itemSize = count((array)$arResult);
  for($index = 0; $index < $itemSize; $index++)
  {
      $title = htmlspecialcharsex($arResult[$index]["TITLE"]);
  
      if($arResult[$index]["LINK"] <> "" && $index != $itemSize-1)
      {
          $strReturn .= '<a  id="bx_breadcrumb_'.$index.'" itemprop="itemListElement" itemscope  href="'.$arResult[$index]["LINK"].'">'.$title.'</a>';
      }
  }
  
  $strReturn .= '</div></div>';
  
  return $strReturn;