Answer the question
In order to leave comments, you need to log in
How to display the properties of an element through "Element Binding"?
Hello.
There is an element ( Product card ). It is necessary to display the properties (Address, Phone, etc.) from another element ( Brand Salon ) in it. Added the "Binding to elements" property to the infoblock of the Product card. In the admin panel, a field for the ID of the Brand Salons infoblock has appeared. And how to further display the desired properties from another element?
Tried:
<div class="salon-place">
<ul>
<?foreach($arResult["PROPERTIES"]["PLACE"]["VALUE"] as $idel):?>
<?$obj = CIBlockElement::GetByID($idel);?>
<?if($objres = $obj->GetNext())?>
<li><a href='<?=$objres["DETAIL_PAGE_URL"];?>'><?=$objres["NAME"];?></a></li>
<?endforeach;?>
</ul>
</div>
It didn't work out. Answer the question
In order to leave comments, you need to log in
in the result_modifier.php file of the template where you want to output, make a request by the id of the attached element and save the data somewhere in $arResult
It is necessary to display properties in it (Address, Phone
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question