Answer the question
In order to leave comments, you need to log in
How to correctly display the custom property of an infoblock?
How to correctly display one custom property of an infoblock?
I create a custom property of the PROPERTY infoblock.
I'm calling the component. I specify the $arParams key with the value - the character code of the custom property.
<?$APPLICATION->IncludeComponent(
"bitrix:news",
"",
Array(
... ,
"PROPERTY_CODE_PROPERTY" => "PROPERTY",
)
);?>
<?if(array_key_exists('PROPERTY_CODE_PROPERTY', $arParams)):?>
<?$PROPERTY = $arParams["PROPERTY_CODE_PROPERTY"]?>
<?else:?>
<?exit?>
<?endif?>
<?if(
array_key_exists($PROPERTY, $arResult["PROPERTIES"]["PROPERTY"]["VALUE"])
&& !empty($arResult["PROPERTIES"]["PROPERTY"]["VALUE"])
):?>
<?=$arResult["PROPERTIES"]["PROPERTY"]["VALUE"]?>
<?endif?>
Answer the question
In order to leave comments, you need to log in
"PROPERTY_CODE_PROPERTY" => "PROPERTY",
"LIST_PROPERTY_CODE" => Array("MY_PROPERTY"),
"DETAIL_PROPERTY_CODE" => Array("MY_PROPERTY"),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question