<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Заявка");?>
<?$APPLICATION->IncludeComponent(
"bitrix:form",
"application",
array(
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_TIME" => "3600",
"CACHE_TYPE" => "A",
"CHAIN_ITEM_LINK" => "",
"CHAIN_ITEM_TEXT" => "",
"COMPONENT_TEMPLATE" => "application",
"EDIT_ADDITIONAL" => "N",
"EDIT_STATUS" => "N",
"IGNORE_CUSTOM_TEMPLATE" => "N",
"NAME_TEMPLATE" => "",
"NOT_SHOW_FILTER" => array(
0 => "",
1 => "",
),
"NOT_SHOW_TABLE" => array(
0 => "",
1 => "",
),
"RESULT_ID" => $_REQUEST[RESULT_ID],
"SEF_MODE" => "N",
"SHOW_ADDITIONAL" => "N",
"SHOW_ANSWER_VALUE" => "N",
"SHOW_EDIT_PAGE" => "N",
"SHOW_LIST_PAGE" => "Y",
"SHOW_STATUS" => "N",
"SHOW_VIEW_PAGE" => "N",
"START_PAGE" => "list",
"SUCCESS_URL" => "",
"USE_EXTENDED_ERRORS" => "N",
"WEB_FORM_ID" => "1",
"VARIABLE_ALIASES" => array(
"action" => "action",
)
),
false
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
<?php
$arUrlRewrite=array (
0 =>
array (
'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#',
'RULE' => 'componentName=$1',
'ID' => NULL,
'PATH' => '/bitrix/services/mobileapp/jn.php',
'SORT' => 100,
),
2 =>
array (
'CONDITION' => '#^/bitrix/services/ymarket/#',
'RULE' => '',
'ID' => '',
'PATH' => '/bitrix/services/ymarket/index.php',
'SORT' => 100,
),
1 =>
array (
'CONDITION' => '#^/rest/#',
'RULE' => '',
'ID' => NULL,
'PATH' => '/bitrix/services/rest/index.php',
'SORT' => 100,
),
);
У раздела есть свойство UF_RECOMMEND - привязка элементов, заходишь на детальную страницу товара и хочешь вывести элементы из UF_RECOMMEND раздела. которому принадлежит товар. Правильно понял?
<div class="content_wrap news_block">
<h2>Новости</h2>
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"cols2",
Array(
"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" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "N",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COMPONENT_TEMPLATE" => "cols2",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "N",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "N",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array(0=>"",1=>"",),
"FILTER_NAME" => "",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "4",
"IBLOCK_TYPE" => "content",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "N",
"MESSAGE_404" => "",
"NEWS_COUNT" => "6",
"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" => array(0=>"",1=>"",),
"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",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "DESC",
"SORT_ORDER2" => "ASC"
)
);?>
</div>
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"cols2_kazan",
Array(
"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" => "Y",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "N",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COMPONENT_TEMPLATE" => "cols2",
"COMPOSITE_FRAME_MODE" => "A",
"COMPOSITE_FRAME_TYPE" => "AUTO",
"DETAIL_URL" => "",
"DISPLAY_BOTTOM_PAGER" => "N",
"DISPLAY_DATE" => "N",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "N",
"DISPLAY_PREVIEW_TEXT" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FIELD_CODE" => array(0=>"",1=>"",),
"FILTER_NAME" => "",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"IBLOCK_ID" => "4",
"IBLOCK_TYPE" => "content",
"INCLUDE_IBLOCK_INTO_CHAIN" => "N",
"INCLUDE_SUBSECTIONS" => "N",
"MESSAGE_404" => "",
"NEWS_COUNT" => "6",
"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" => array(0=>"",1=>"",),
"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",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_BY2" => "SORT",
"SORT_ORDER1" => "DESC",
"SORT_ORDER2" => "ASC"
)
);?>
</div>
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @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 */
$this->setFrameMode(true);
?>
<div class="news-2cols">
<?
$i = 0;
$max_lenght = ceil(count($arResult["ITEMS"])/2);
foreach($arResult["ITEMS"] as $arItem):
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
?>
<?if($i == 0):?><div class='news_col'><?endif;?>
<div class="news_item" id="<?=$this->GetEditAreaId($arItem['ID']);?>">
<a href="<?=$arItem["DETAIL_PAGE_URL"]?>"><b><?echo $arItem["NAME"]?></b></a>
<div class='desc'><?=$arItem["PREVIEW_TEXT"];?></div>
</div>
<?$i++;?>
<?if($i == $max_lenght):?></div><?$i=0; endif;?>
<?endforeach;?>
<?if($i != $max_lenght && $i != 0):?></div><?endif?>
</div>