A
A
Anton Ovchinnikov2021-01-14 14:45:23
1C-Bitrix
Anton Ovchinnikov, 2021-01-14 14:45:23

How to display infoblock properties on the search results page in Bitrix?

The standard page only displays

<p ><?echo $arItem["TITLE_FORMATED"]?></p>
<p><?echo $arItem["BODY_FORMATED"]?></p>


There is no way to add it somehow . Googled googled didn't google(
<?echo $arItem['PROPERTIES']['NAME']['VALUE'];?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-01-14
Madzhugin @Suntechnic

No way - the standard search component displays search elements and not infoblock elements - there will be no ['PROPERTIES']['NAME']['VALUE']
There are two options:
1 get infoblock element id from search elements and feed them as a filter to news.list entry im already displaying items.
2 in the result_modifier.php of the search component template, take out the missing data.
I would choose the second.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question