Answer the question
In order to leave comments, you need to log in
How to display the property of a component in the list of products (1C Bitrix)?
Good afternoon. The problem is this: there is a component that displays a list of product lines. For this component, I created a property of type "text/html". And the property is not displayed on the list page. Moreover, everything is fine on the detailed page. The code that displays this property is -
<?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?=$arProperty["NAME"]?>:
<?if(is_array($arProperty["DISPLAY_VALUE"])):?>
<?=implode(" / ", $arProperty["DISPLAY_VALUE"]);?>
<?else:?>
<?=$arProperty["DISPLAY_VALUE"];?>
<?endif?>
<br />
<?endforeach;?>
Answer the question
In order to leave comments, you need to log in
As far as I remember, the list of pages has a different construction of the properties of the elements. there is something like$arItem['PROPERTIES']['DISPLAY_VALUE']['VALUE']
Did you specify it in the component settings so that it is displayed? There is such Properties for the list of materials, properties for the detailed page.
Second, they are not stored in arResult, but in arItem. arResult stores a list of the materials themselves
$arItem["DISPLAY_PROPERTIES"]
More properties can be found in $arItem["PROPERTIES"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question