Здравствуйте!
В процессе реализации поиска возникла потребность рядом с элементом выводить его свойства, такие как PRICE NDS EMPTY.
Код вывода результатов поиска:
<?elseif(count($arResult["SEARCH"])>0):?>
<?if($arParams["DISPLAY_TOP_PAGER"] != "N") echo $arResult["NAV_STRING"]?>
<div class="search-items-wrapper">
<?foreach($arResult["SEARCH"] as $arItem):?>
<div class="news-item">
<a class="service__link" href="<?echo $arItem["URL"]?>"><?echo $arItem["TITLE_FORMATED"]?></a>
<p class="service__field"></p>
<p class="service__field"></p>
<p class="service__field"></p>
</div>
<?endforeach;?>
Сам компонент:
APPLICATION->SetTitle("Поиск");?><?$APPLICATION->IncludeComponent(
"bitrix:search.page",
"search-service-inner",
Array(
"AJAX_MODE" => "Y",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "Y",
"AJAX_OPTION_STYLE" => "Y",
"CACHE_TIME" => "3600",
"CACHE_TYPE" => "A",
"CHECK_DATES" => "Y",
"COLOR_NEW" => "000000",
"COLOR_OLD" => "C8C8C8",
"COLOR_TYPE" => "Y",
"DEFAULT_SORT" => "rank",
"DISPLAY_BOTTOM_PAGER" => "Y",
"DISPLAY_TOP_PAGER" => "N",
"FILTER_NAME" => "",
"FONT_MAX" => "50",
"FONT_MIN" => "10",
"NAME_TEMPLATE" => "#LAST_NAME# #NAME#",
"NO_WORD_LOGIC" => "N",
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_TEMPLATE" => "round",
"PAGER_TITLE" => "Результаты поиска",
"PAGE_RESULT_COUNT" => "10",
"PATH_TO_USER_PROFILE" => "#SITE_DIR#people/user/#USER_ID#/",
"PERIOD_NEW_TAGS" => "",
"RATING_TYPE" => "",
"RESTART" => "N",
"SHOW_CHAIN" => "Y",
"SHOW_ITEM_DATE_CHANGE" => "Y",
"SHOW_ITEM_TAGS" => "Y",
"SHOW_LOGIN" => "Y",
"SHOW_ORDER_BY" => "Y",
"SHOW_RATING" => "",
"SHOW_TAGS_CLOUD" => "N",
"SHOW_WHEN" => "N",
"SHOW_WHERE" => "N",
"STRUCTURE_FILTER" => "structure",
"TAGS_INHERIT" => "Y",
"TAGS_PAGE_ELEMENTS" => "20",
"TAGS_PERIOD" => "",
"TAGS_SORT" => "NAME",
"TAGS_URL_SEARCH" => "",
"USE_LANGUAGE_GUESS" => "Y",
"USE_SUGGEST" => "Y",
"USE_TITLE_RANK" => "N",
"WIDTH" => "100%",
"arrFILTER" => array(),
"arrFILTER_iblock_news" => array(0=>"all",),
"arrFILTER_iblock_service" => array(),
"arrWHERE" => array(0=>"iblock_news",)
)
);?>
И вот задача, как в цикле выводить значения свойств каждого элемента и указать их в
<p class="service__field"></p>
?
Пытался распечатывать массив arResult и arItem, но там свойств не обнаружил.