server {
listen 80;
server_name react-cod.ru www.react-cod.ru;
location / {
root /root/frontend/build;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ~ \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
error_page 404 /index.html;
}
<?php
// Получаем название текущего товара
$currentProductName = "Компьютер 0123"; // Здесь вы должны динамически получить название товара
// Подключаем компонент хлебных крошек
$APPLICATION->IncludeComponent(
"bitrix:breadcrumb",
"",
array(
"PATH" => "",
"SITE_ID" => "s1",
"COMPONENT_TEMPLATE" => ".default"
),
false
);
// Получаем массив хлебных крошек
$breadcrumbs = $APPLICATION->GetCurDir();
$breadcrumbsArray = $APPLICATION->GetNavChain($breadcrumbs);
// Изменяем последнюю крошку
if (!empty($breadcrumbsArray)) {
$lastBreadcrumbKey = count($breadcrumbsArray) - 1;
$breadcrumbsArray[$lastBreadcrumbKey]['NAME'] .= ' ' . $currentProductName;
// Выводим измененные хлебные крошки
echo '<div class="breadcrumb">';
foreach ($breadcrumbsArray as $breadcrumb) {
echo '<a href="' . $breadcrumb['LINK'] . '">' . $breadcrumb['NAME'] . '</a> > ';
}
echo '</div>';
}
?>
tar cvfz - --directory /var/www/3dpaneli.ru/web --exclude='./bitrix/updates' --exclude='./upload/1c_import_light' . |ssh