@ -1,4 +1,5 @@
<? if ( ! defined ( "B_PROLOG_INCLUDED" ) || B_PROLOG_INCLUDED !== true ) die ();
<? if ( ! defined ( "B_PROLOG_INCLUDED" ) || B_PROLOG_INCLUDED !== true )
die();
use Bitrix\Main\Loader;
use Bitrix\Main\ModuleManager;
@ -8,6 +9,31 @@ use Bitrix\Iblock\SectionTable;
Loader::includeModule('iblock');
// Устанавливаем SEO мета-теги
global $sotbitSeoMetaTitle;
global $sotbitSeoMetaKeywords;
global $sotbitSeoMetaDescription;
global $sotbitSeoMetaBreadcrumbTitle;
global $sotbitSeoMetaH1;
if (!empty($sotbitSeoMetaH1)) {
$APPLICATION->SetTitle($sotbitSeoMetaH1);
}
if (!empty($sotbitSeoMetaTitle)) {
$APPLICATION->SetPageProperty("title", $sotbitSeoMetaTitle);
}
if (!empty($sotbitSeoMetaKeywords)) {
$APPLICATION->SetPageProperty("keywords", $sotbitSeoMetaKeywords);
}
if (!empty($sotbitSeoMetaDescription)) {
$APPLICATION->SetPageProperty("description", $sotbitSeoMetaDescription);
}
if (!empty($sotbitSeoMetaBreadcrumbTitle)) {
$APPLICATION->AddChainItem($sotbitSeoMetaBreadcrumbTitle);
}
$GLOBALS['CATALOG_CURRENT_SECTION_ID'] = $intSectionID;
// Получаем ID раздела из arResult
$sectionId = $arResult['VARIABLES']['SECTION_ID'] ?? null;
@ -31,24 +57,25 @@ if ($sectionId) {
* @var array $arCurSection
*/
if (isset($arParams['USE_COMMON_SETTINGS_BASKET_POPUP']) & & $arParams['USE_COMMON_SETTINGS_BASKET_POPUP'] == 'Y')
{
if (isset($arParams['USE_COMMON_SETTINGS_BASKET_POPUP']) & & $arParams['USE_COMMON_SETTINGS_BASKET_POPUP'] == 'Y') {
$basketAction = $arParams['COMMON_ADD_TO_BASKET_ACTION'] ?? '';
}
else
{
} else {
$basketAction = $arParams['SECTION_ADD_TO_BASKET_ACTION'] ?? '';
}
?>
$APPLICATION->IncludeComponent("bitrix:breadcrumb","breadcrumbs",Array(
<?
$APPLICATION->IncludeComponent(
"bitrix:breadcrumb",
"breadcrumbs",
array(
"START_FROM" => "0",
"PATH" => "",
"SITE_ID" => "s1"
)
);
?>
<? // GP | Главный экран ?>
< section class = "text-section section container" >
< div class = "text-section__title" >
Компания < span class = "orange-text" > Эра< / span > < span class = "green-text" > Септик< / span > более 10 лет оказывает услуги по производству и установке септиков для загородных домов и дач
@ -58,7 +85,8 @@ $APPLICATION->IncludeComponent("bitrix:breadcrumb","breadcrumbs",Array(
< / p >
< / section >
< section class = "catalog-page container section" >
<? // GP | Сайдбар с фильтром ?>
< section class = "catalog-page container section" >
< h2 class = "catalog-page__title" > Каталог товаров< / h2 >
< div class = "catalog-page__wrap" >
< aside class = "catalog-page__filter" >
@ -103,10 +131,10 @@ $APPLICATION->IncludeComponent("bitrix:breadcrumb","breadcrumbs",Array(
?>
< / div >
< / aside >
<?php
<?php
$intSectionID = $APPLICATION->IncludeComponent(
$intSectionID = $APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"",
array(
@ -178,8 +206,8 @@ $intSectionID = $APPLICATION->IncludeComponent(
"SECTION_ID" => $arResult["VARIABLES"]["SECTION_ID"],
"SECTION_CODE" => $arResult["VARIABLES"]["SECTION_CODE"],
"SECTION_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["section"],
"DETAIL_URL" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["element"],
"SECTION_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["section"],
"DETAIL_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["element"],
"USE_MAIN_ELEMENT_SECTION" => $arParams["USE_MAIN_ELEMENT_SECTION"],
'CONVERT_CURRENCY' => $arParams['CONVERT_CURRENCY'],
'CURRENCY_ID' => $arParams['CURRENCY_ID'],
@ -226,7 +254,7 @@ $intSectionID = $APPLICATION->IncludeComponent(
"ADD_SECTIONS_CHAIN" => "N",
'ADD_TO_BASKET_ACTION' => $basketAction,
'SHOW_CLOSE_POPUP' => isset($arParams['COMMON_SHOW_CLOSE_POPUP']) ? $arParams['COMMON_SHOW_CLOSE_POPUP'] : '',
'COMPARE_PATH' => $arResult['FOLDER'].$arResult['URL_TEMPLATES']['compare'],
'COMPARE_PATH' => $arResult['FOLDER'] . $arResult['URL_TEMPLATES']['compare'],
'COMPARE_NAME' => $arParams['COMPARE_NAME'],
'USE_COMPARE_LIST' => 'Y',
'BACKGROUND_IMAGE' => (isset($arParams['SECTION_BACKGROUND_IMAGE']) ? $arParams['SECTION_BACKGROUND_IMAGE'] : ''),
@ -234,12 +262,15 @@ $intSectionID = $APPLICATION->IncludeComponent(
'DISABLE_INIT_JS_IN_COMPONENT' => (isset($arParams['DISABLE_INIT_JS_IN_COMPONENT']) ? $arParams['DISABLE_INIT_JS_IN_COMPONENT'] : '')
),
$component
);
?>
);
?>
< / div >
< / section >
<?php
// Подключаем компонент sotbit:seo.meta
< / section >
<? // GP | Подключаем компонент sotbit:seo.meta ?>
<?
$APPLICATION->IncludeComponent(
"sotbit:seo.meta",
".default",
@ -250,37 +281,11 @@ $APPLICATION->IncludeComponent(
"CACHE_TIME" => $arParams["CACHE_TIME"],
)
);
?>
// Устанавливаем SEO мета-теги
global $sotbitSeoMetaTitle;
global $sotbitSeoMetaKeywords;
global $sotbitSeoMetaDescription;
global $sotbitSeoMetaBreadcrumbTitle;
global $sotbitSeoMetaH1;
if(!empty($sotbitSeoMetaH1))
{
$APPLICATION->SetTitle($sotbitSeoMetaH1);
}
if(!empty($sotbitSeoMetaTitle))
{
$APPLICATION->SetPageProperty("title", $sotbitSeoMetaTitle);
}
if(!empty($sotbitSeoMetaKeywords))
{
$APPLICATION->SetPageProperty("keywords", $sotbitSeoMetaKeywords);
}
if(!empty($sotbitSeoMetaDescription))
{
$APPLICATION->SetPageProperty("description", $sotbitSeoMetaDescription);
}
if(!empty($sotbitSeoMetaBreadcrumbTitle))
{
$APPLICATION->AddChainItem($sotbitSeoMetaBreadcrumbTitle);
}
$GLOBALS['CATALOG_CURRENT_SECTION_ID'] = $intSectionID;
?>
<? // GP | Популярные категории ?>
< section class = "catalog-page__services services container section" >
< h2 class = "section-title" > Популярные категории< / h2 >
< div class = "services__list" >
@ -311,7 +316,7 @@ $GLOBALS['CATALOG_CURRENT_SECTION_ID'] = $intSectionID;
< / div >
< / section >
<? // GP | SEO-текст ?>
<?php
if (\Bitrix\Main\Loader::includeModule("iblock")) {
$sectionId = $arResult['VARIABLES']['SECTION_ID'];
@ -327,12 +332,10 @@ if (\Bitrix\Main\Loader::includeModule("iblock")) {
echo '< / div > ';
}
}
}
else{
} else {
?>
< section class = "catalog-page__seo container section" >
< section class = "catalog-page__seo container section" >
< div class = "catalog-page__seo-item" >
< div class = "catalog-page__seo-name" >
SEO-текст
@ -359,12 +362,9 @@ if (\Bitrix\Main\Loader::includeModule("iblock")) {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes.
< / p >
< / div >
< / section >
< / section >
<?php
}
}
?>