О нас
Разработчикам
Заметки
Переводчик
Транслитератор
Сравнить текст
Генератор пароля
Ip и информация
Декодировать JSON
Локация
О нас
Разработчикам
Заметки
Переводчик
Транслитератор
Сравнить текст
Генератор пароля
Ip и информация
Декодировать JSON
Локация
Bitrix components
us.content
<?php /** @var array $arParams */ /** @var array $arResult */ /** @global CMain $APPLICATION */ /** @global CUser $USER */ /** @global CDatabase $DB */ /** @var CBitrixComponentTemplate $this */ /** @var string $templateName */ /** @var string $templateFile */ /** @var string $templateFolder */ /** @var string $componentPath */ /** @var CBitrixComponent $component */ // Включаемая область $APPLICATION->IncludeFile( SITE_DIR . 'inc/test.php', [], ['MODE' => 'text'] // 'MODE' => 'php' - Включаемая область в режиме php ); // Или $APPLICATION->IncludeComponent( 'bitrix:main.include', '', [ 'AREA_FILE_SHOW' => 'file', 'PATH' => '/local/inc/file_name.php', 'EDIT_TEMPLATE' => '' ], false ); // Лента новостей $APPLICATION->IncludeComponent( 'bitrix:news.line', 'template_name', [ 'ACTIVE_DATE_FORMAT' => 'd.m.Y', 'CACHE_GROUPS' => 'Y', 'CACHE_TIME' => '36000000', 'CACHE_TYPE' => 'A', 'DETAIL_URL' => '', 'FIELD_CODE' => [ 'ID', 'CODE', 'NAME', 'SORT', ], 'IBLOCK_TYPE' => 'iblock_id', // Id типа инфоблока 'IBLOCKS' => [ 777, // Id инфоблока ], 'NEWS_COUNT' => '6', // Максимальное кол-во 'SORT_BY1' => 'SORT', 'SORT_BY2' => 'ACTIVE_FROM', 'SORT_ORDER1' => 'DESC', 'SORT_ORDER2' => 'ASC', ], false ); // Фильтруем, можно по любым параметрам global $arFilter; $arFilter = [ 'ID' => [1, 2], //'!ID' => [1, 2], // Id не равно //'=PROPERTY_STRING' => 'VALUE', // По свойству //'=PROPERTY_SELECT_VALUE' => 'Значение из списка', //'>CATALOG_PRICE_BASE' => 4000 // По цене //'INCLUDE_SUBSECTIONS' =>'Y', 'DEPTH_LEVEL' => 3, // для bitrix:catalog.section если нужно получить элементы с вложенных разделом ]; // Фильтр или $arFilter = [ 'LOGIC' => 'OR', ['A' => 'Y'], ['B' => 'Y'], ]; // Для слайдера или других инфо-блоков $APPLICATION->IncludeComponent( 'bitrix:news.list', 'template_name', [ 'FILTER_NAME' => 'arrFilter', 'FIELD_CODE' => [ 'ID', 'CODE', 'NAME', 'SORT', ], 'IBLOCK_ID' => 777, // Id инфоблока 'IBLOCK_TYPE' => 'iblock_id', // Id типа инфоблока 'NEWS_COUNT' => '6', // Максимальное кол-во 'CACHE_FILTER' => 'N', 'CACHE_GROUPS' => 'Y', 'CACHE_TIME' => '36000000', 'CACHE_TYPE' => 'A', 'ACTIVE_DATE_FORMAT' => 'd.m.Y', 'ADD_SECTIONS_CHAIN' => 'N', 'AJAX_MODE' => 'N', 'AJAX_OPTION_ADDITIONAL' => '', 'AJAX_OPTION_HISTORY' => 'N', 'AJAX_OPTION_JUMP' => 'N', 'AJAX_OPTION_STYLE' => 'N', 'CHECK_DATES' => 'Y', 'DETAIL_URL' => '', 'DISPLAY_BOTTOM_PAGER' => 'Y', 'DISPLAY_DATE' => 'N', 'DISPLAY_NAME' => 'N', 'DISPLAY_PICTURE' => 'N', 'DISPLAY_PREVIEW_TEXT' => 'N', 'DISPLAY_TOP_PAGER' => 'N', 'HIDE_LINK_WHEN_NO_DETAIL' => 'N', 'INCLUDE_IBLOCK_INTO_CHAIN' => 'N', 'INCLUDE_SUBSECTIONS' => 'Y', 'MESSAGE_404' => '', 'PAGER_BASE_LINK_ENABLE' => 'N', 'PAGER_DESC_NUMBERING' => 'N', 'PAGER_DESC_NUMBERING_CACHE_TIME' => '36000', 'PAGER_SHOW_ALL' => 'N', 'PAGER_SHOW_ALWAYS' => 'N', 'PAGER_TEMPLATE' => '.default', 'PAGER_TITLE' => 'Новости', 'PARENT_SECTION' => '', 'PARENT_SECTION_CODE' => '', 'PREVIEW_TRUNCATE_LEN' => '', 'PROPERTY_CODE' => [], 'SET_BROWSER_TITLE' => 'N', 'SET_LAST_MODIFIED' => 'N', 'SET_META_DESCRIPTION' => 'N', 'SET_META_KEYWORDS' => 'N', 'SET_STATUS_404' => 'N', 'SET_TITLE' => 'N', 'SHOW_404' => 'N', 'STRICT_SECTION_CHECK' => 'N', 'SORT_BY1' => 'SORT', 'SORT_BY2' => 'ACTIVE_FROM', 'SORT_ORDER1' => 'DESC', 'SORT_ORDER2' => 'ASC', ], false ); // Файл menu_ext.php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die(); global $APPLICATION; $aMenuLinksExt = $APPLICATION->IncludeComponent( 'bitrix:menu.sections', '', [ 'IS_SEF' => 'Y', 'SEF_BASE_URL' => '/blog/', 'SECTION_PAGE_URL' => '#SECTION_CODE_PATH#/', 'DETAIL_PAGE_URL' => '#SECTION_CODE_PATH#/#ELEMENT_CODE#.html', 'IBLOCK_TYPE' => 'content', // Название для группы инфо-блоков 'IBLOCK_ID' => '5', // ID инфо-блока 'DEPTH_LEVEL' => '3', // Уровень вложенности 'CACHE_TYPE' => 'A', 'CACHE_TIME' => '36000000' ], false ); $aMenuLinks = array_merge($aMenuLinksExt, $aMenuLinks); // Переставить местами, если нужно пункты основного меню выводить сверху // Список разделов $APPLICATION->IncludeComponent( 'bitrix:catalog.section.list', '', // Название шаблона [ 'IBLOCK_TYPE' => $arParams['IBLOCK_TYPE'], 'IBLOCK_ID' => $arParams['IBLOCK_ID'], 'SECTION_ID' => $arResult['VARIABLES']['SECTION_ID'], 'SECTION_CODE' => $arResult['VARIABLES']['SECTION_CODE'], 'DISPLAY_PANEL' => 'N', 'CACHE_TYPE' => $arParams['CACHE_TYPE'], 'CACHE_TIME' => $arParams['CACHE_TIME'], 'CACHE_GROUPS' => $arParams['CACHE_GROUPS'], 'SECTION_URL' => $arResult['FOLDER'] . $arResult['URL_TEMPLATES']['section'], // 'DEPTH_LEVEL' => '1', ], $component ); // Список разделов $APPLICATION->IncludeComponent( 'bitrix:catalog.section.list', 'top_menu', [ 'CUSTOM_SECTION_SORT' => ['ID' => 'DESC'], 'IBLOCK_TYPE' => 'menu', 'IBLOCK_ID' => 6, 'CACHE_TYPE' => 'A', 'CACHE_TIME' => 36000000, 'CACHE_GROUPS' => 'Y', ], ); // Рекомендуемые товары $APPLICATION->IncludeComponent( 'bitrix:catalog.section', 'blocks', // Шаблон компонента [ 'ACTION_VARIABLE' => 'action', 'ADD_PICT_PROP' => '-', 'ADD_PROPERTIES_TO_BASKET' => 'N', 'ADD_SECTIONS_CHAIN' => 'N', 'ADD_TO_BASKET_ACTION' => 'ADD', 'AJAX_MODE' => 'N', 'AJAX_OPTION_ADDITIONAL' => '', 'AJAX_OPTION_HISTORY' => 'N', 'AJAX_OPTION_JUMP' => 'N', 'AJAX_OPTION_STYLE' => 'Y', 'BACKGROUND_IMAGE' => '-', 'BASKET_URL' => '/personal/cart/', 'BROWSER_TITLE' => '-', 'CACHE_FILTER' => 'N', 'CACHE_GROUPS' => 'Y', 'CACHE_TIME' => '36000000', 'CACHE_TYPE' => 'A', 'COMPATIBLE_MODE' => 'Y', 'CONVERT_CURRENCY' => 'N', 'CUSTOM_FILTER' => '', 'DETAIL_URL' => '/catalog/#SECTION_CODE_PATH#/#ELEMENT_CODE#.php', 'DISABLE_INIT_JS_IN_COMPONENT' => 'N', 'DISPLAY_BOTTOM_PAGER' => 'Y', 'DISPLAY_COMPARE' => 'N', 'DISPLAY_TOP_PAGER' => 'N', 'ELEMENT_SORT_FIELD' => 'shows', // По кол-ву просмотров - это для популярных 'ELEMENT_SORT_FIELD2' => 'RAND', // Рамдомно 'ELEMENT_SORT_ORDER' => 'desc', 'ELEMENT_SORT_ORDER2' => 'asc', 'ENLARGE_PRODUCT' => 'STRICT', 'FILTER_NAME' => 'arrFilter', 'HIDE_NOT_AVAILABLE' => 'N', 'HIDE_NOT_AVAILABLE_OFFERS' => 'N', 'IBLOCK_ID' => '30', 'IBLOCK_TYPE' => 'yml_import', 'INCLUDE_SUBSECTIONS' => 'Y', 'LABEL_PROP' => '', 'LAZY_LOAD' => 'N', 'LINE_ELEMENT_COUNT' => '1', 'LOAD_ON_SCROLL' => 'N', 'MESSAGE_404' => '', 'MESS_BTN_ADD_TO_BASKET' => 'В корзину', 'MESS_BTN_BUY' => 'Купить', 'MESS_BTN_DETAIL' => 'Подробнее', 'MESS_BTN_SUBSCRIBE' => 'Подписаться', 'MESS_NOT_AVAILABLE' => 'Нет в наличии', 'META_DESCRIPTION' => '-', 'META_KEYWORDS' => '-', 'OFFERS_CART_PROPERTIES' => [], 'OFFERS_FIELD_CODE' => [0=>'',1=>'',], 'OFFERS_LIMIT' => '5', 'OFFERS_PROPERTY_CODE' => [0=>'',1=>'',], 'OFFERS_SORT_FIELD' => 'sort', 'OFFERS_SORT_FIELD2' => 'id', 'OFFERS_SORT_ORDER' => 'asc', 'OFFERS_SORT_ORDER2' => 'desc', 'PAGER_BASE_LINK_ENABLE' => 'N', 'PAGER_DESC_NUMBERING' => 'N', 'PAGER_DESC_NUMBERING_CACHE_TIME' => '36000', 'PAGER_SHOW_ALL' => 'N', 'PAGER_SHOW_ALWAYS' => 'N', 'PAGER_TEMPLATE' => '.default', 'PAGER_TITLE' => 'Товары', 'PAGE_ELEMENT_COUNT' => '10', 'PARTIAL_PRODUCT_PROPERTIES' => 'N', 'PRICE_CODE' => ['BASE'], 'PRICE_VAT_INCLUDE' => 'Y', 'PRODUCT_BLOCKS_ORDER' => 'price,props,sku,quantityLimit,quantity,buttons,compare', 'PRODUCT_DISPLAY_MODE' => 'N', 'PRODUCT_ID_VARIABLE' => 'id', 'PRODUCT_PROPERTIES' => [''], 'PRODUCT_PROPS_VARIABLE' => 'prop', 'PRODUCT_QUANTITY_VARIABLE' => 'quantity', 'PRODUCT_ROW_VARIANTS' => "[{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false}]", 'PRODUCT_SUBSCRIPTION' => 'Y', 'PROPERTY_CODE' => ['', ''], 'PROPERTY_CODE_MOBILE' => '', 'RCM_PROD_ID' => $_REQUEST['PRODUCT_ID'], 'RCM_TYPE' => 'personal', 'SECTION_CODE' => '', // В товаре $arResault['VARIABLES']['SECTION_CODE'], а SECTION_ID не надо - это для рекомендуемых из того же раздела 'SECTION_ID' => $_REQUEST['SECTION_ID'], // Написать id или выше SECTION_CODE 'SECTION_ID_VARIABLE' => 'SECTION_ID', 'SECTION_URL' => '/catalog/#SECTION_ID#/', 'SECTION_USER_FIELDS' => ['', ''], 'SEF_MODE' => 'N', 'SET_BROWSER_TITLE' => 'N', // Если как рекомендуемые, то N 'SET_LAST_MODIFIED' => 'N', // Если как рекомендуемые, то N 'SET_META_DESCRIPTION' => 'N', // Если как рекомендуемые, то N 'SET_META_KEYWORDS' => 'N', // Если как рекомендуемые, то N 'SET_STATUS_404' => 'N', // Если как рекомендуемые, то N 'SET_TITLE' => 'N', // Если как рекомендуемые, то N 'SHOW_404' => 'N', 'SHOW_ALL_WO_SECTION' => 'Y', 'SHOW_CLOSE_POPUP' => 'N', 'SHOW_DISCOUNT_PERCENT' => 'N', 'SHOW_FROM_SECTION' => 'N', 'SHOW_MAX_QUANTITY' => 'N', 'SHOW_OLD_PRICE' => 'N', 'SHOW_PRICE_COUNT' => '1', 'SHOW_SLIDER' => 'Y', 'SLIDER_INTERVAL' => '3000', 'SLIDER_PROGRESS' => 'N', 'TEMPLATE_THEME' => 'blue', 'USE_ENHANCED_ECOMMERCE' => 'N', 'USE_MAIN_ELEMENT_SECTION' => 'N', 'USE_PRICE_COUNT' => 'N', 'USE_PRODUCT_QUANTITY' => 'Y' ] ); // Просмотренные товары $APPLICATION->IncludeComponent( "bitrix:catalog.products.viewed", "catalog_slide", Array( "ACTION_VARIABLE" => "action_cpv", "ADDITIONAL_PICT_PROP_19" => "-", "ADDITIONAL_PICT_PROP_5" => "-", "ADD_PROPERTIES_TO_BASKET" => "Y", "ADD_TO_BASKET_ACTION" => "ADD", "BASKET_URL" => "/personal/basket.php", "CACHE_GROUPS" => "Y", "CACHE_TIME" => "3600", "CACHE_TYPE" => "A", "CART_PROPERTIES_19" => array("",""), "CART_PROPERTIES_5" => array("",""), "CONVERT_CURRENCY" => "N", "DEPTH" => "2", "DISPLAY_COMPARE" => "N", "ENLARGE_PRODUCT" => "STRICT", "HIDE_NOT_AVAILABLE" => "N", "HIDE_NOT_AVAILABLE_OFFERS" => "N", "IBLOCK_ID" => "5", "IBLOCK_MODE" => "single", "IBLOCK_TYPE" => "Rhome", "LABEL_PROP_5" => array(), "LABEL_PROP_POSITION" => "top-left", "MESS_BTN_ADD_TO_BASKET" => "В корзину", "MESS_BTN_BUY" => "Купить", "MESS_BTN_DETAIL" => "Подробнее", "MESS_BTN_SUBSCRIBE" => "Подписаться", "MESS_NOT_AVAILABLE" => "Нет в наличии", "OFFER_TREE_PROPS_19" => array(), "PAGE_ELEMENT_COUNT" => "9", "PARTIAL_PRODUCT_PROPERTIES" => "N", "PRICE_CODE" => array(), "PRICE_VAT_INCLUDE" => "Y", "PRODUCT_BLOCKS_ORDER" => "price,props,sku,quantityLimit,quantity,buttons", "PRODUCT_ID_VARIABLE" => "id", "PRODUCT_PROPS_VARIABLE" => "prop", "PRODUCT_QUANTITY_VARIABLE" => "quantity", "PRODUCT_ROW_VARIANTS" => "[{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false}]", "PRODUCT_SUBSCRIPTION" => "Y", "PROPERTY_CODE_19" => array("",""), "PROPERTY_CODE_5" => array("",""), "SECTION_CODE" => "", "SECTION_ELEMENT_CODE" => "", "SECTION_ELEMENT_ID" => $GLOBALS["CATALOG_CURRENT_ELEMENT_ID"], "SECTION_ID" => $GLOBALS["CATALOG_CURRENT_SECTION_ID"], "SHOW_CLOSE_POPUP" => "N", "SHOW_DISCOUNT_PERCENT" => "N", "SHOW_FROM_SECTION" => "N", "SHOW_MAX_QUANTITY" => "N", "SHOW_OLD_PRICE" => "N", "SHOW_PRICE_COUNT" => "1", "SHOW_SLIDER" => "Y", "SLIDER_INTERVAL" => "3000", "SLIDER_PROGRESS" => "N", "TEMPLATE_THEME" => "blue", "USE_ENHANCED_ECOMMERCE" => "N", "USE_PRICE_COUNT" => "N", "USE_PRODUCT_QUANTITY" => "N" ) ); // Форма обратной связи $APPLICATION->IncludeComponent( 'bitrix:iblock.element.add', 'bootstrap', [ 'IBLOCK_ID' => getIblockIdByCode('order_kd'), 'IBLOCK_TYPE' => 'forms', 'ACCEPT_LINK' => false, 'BUTTON' => 'Оформить заказ', 'SUCCESS_PAGE' => '/success-page/', 'LABELS' => false, 'CUSTOM_TITLE_NAME' => 'Связаться с нами', 'FORM_ID' => 'order_kd3', 'FORM_NAME' => 'order_kd', 'PROPERTY_CODES' => array( 0 => '64', 1 => '65', 2 => '66', 3 => '67', 4 => '68', 5 => '69', 6 => '72', 7 => 'NAME', 8 => 'PREVIEW_TEXT', ), 'PROPERTY_CODES_REQUIRED' => array( 0 => '65', 1 => '66', 2 => '68', 3 => 'NAME', ), 'AJAX_MODE' => 'N', 'AJAX_OPTION_ADDITIONAL' => '', 'AJAX_OPTION_HISTORY' => 'N', 'AJAX_OPTION_JUMP' => 'N', 'AJAX_OPTION_STYLE' => 'N', 'ALLOW_DELETE' => 'N', 'ALLOW_EDIT' => 'N', 'CUSTOM_TITLE_DATE_ACTIVE_FROM' => '', 'CUSTOM_TITLE_DATE_ACTIVE_TO' => '', 'CUSTOM_TITLE_DETAIL_PICTURE' => '', 'CUSTOM_TITLE_DETAIL_TEXT' => '', 'CUSTOM_TITLE_IBLOCK_SECTION' => '', 'CUSTOM_TITLE_PREVIEW_PICTURE' => '', 'CUSTOM_TITLE_PREVIEW_TEXT' => '', 'CUSTOM_TITLE_TAGS' => '', 'DEFAULT_INPUT_SIZE' => '255', 'DETAIL_TEXT_USE_HTML_EDITOR' => 'N', 'ELEMENT_ASSOC' => 'CREATED_BY', 'GROUPS' => array( 0 => '2', ), 'LEVEL_LAST' => 'Y', 'MAX_FILE_SIZE' => '0', 'MAX_LEVELS' => '10000', 'MAX_USER_ENTRIES' => '10000', 'NAV_ON_PAGE' => '1', 'PREVIEW_TEXT_USE_HTML_EDITOR' => 'N', 'RESIZE_IMAGES' => 'N', 'SEF_MODE' => 'N', 'STATUS' => 'ANY', 'STATUS_NEW' => 'N', 'USER_MESSAGE_ADD' => '', 'USER_MESSAGE_EDIT' => '', 'USE_CAPTCHA' => 'N', 'COMPONENT_TEMPLATE' => 'bootstrap' ], false );
Список