Maks | вывел в хлебные крошки поле от Сотбит для посадочных

web_99
Andrei 2 months ago
parent 389e8036a0
commit b150193153
  1. 10
      local/templates/.default/components/bitrix/breadcrumb/breadcrumbs/template.php

@ -6,6 +6,7 @@ if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
*/ */
global $APPLICATION; global $APPLICATION;
global $sotbitSeoMetaBreadcrumbTitle;
//delayed function must return a string //delayed function must return a string
if(empty($arResult)) if(empty($arResult))
@ -19,7 +20,12 @@ $itemSize = count($arResult);
for($index = 0; $index < $itemSize; $index++) for($index = 0; $index < $itemSize; $index++)
{ {
$title = htmlspecialcharsex($arResult[$index]["TITLE"]); if ($sotbitSeoMetaBreadcrumbTitle) {
$title = $sotbitSeoMetaBreadcrumbTitle; // вывели "Название страницы в хлебных крошках" из Сотбит
}else{
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
}
if (mb_strtoupper($title) === "ГЛАВНАЯ СТРАНИЦА") { if (mb_strtoupper($title) === "ГЛАВНАЯ СТРАНИЦА") {
$title = "Главная"; $title = "Главная";
@ -39,7 +45,7 @@ for($index = 0; $index < $itemSize; $index++)
{ {
$strReturn .= ' $strReturn .= '
<li class="breadcrumbs__item"> <li class="breadcrumbs__item">
'.$title.' '. $title .'
</li>'; </li>';
} }
} }

Loading…
Cancel
Save