I
I
IgorRastarov2017-05-15 14:28:09
1C-Bitrix
IgorRastarov, 2017-05-15 14:28:09

How to display properties of a property in Bitrix?

Hello.
I need to Display properties of type binding to elements - set, these properties have their own properties.

<?
foreach($arResult["PROPERTIES"]["CALL"]["VALUE"] as $call)
{
  $call = CIBlockElement::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_ID"=>"4", "ID"=>$call),false, Array("ID", "IBLOCK_ID")); ;	
        while($ob = $сall->GetNextElement()){ 
        $arFields = $ob->GetFields();  //тут поля Имя, превьюхи и тд
        $arProps = $ob->GetProperties(); // тут свойства. Продолжительность, время и т.д
          }
        $arResult["CALLP"][] = $arProps;
        $arResult["CALLF"][] = $arFields;
        }
?>
<h2>Звонки</h2>
<?foreach($arResult["CALLP"] as $arItem):?> //так свойства
<?foreach($arResult["CALLF"] as $arItems):?> //без него не выыодится имена
  <?=$arItems["NAME"];?> //вывод имени звонка
  <?=$arItem["LONG"]["VALUE"];?> //вывод продолжительности звонка
<?endforeach?>
<?endforeach?>

With my code I end up with duplication. Displays the same thing over and over again.
Tell me, please, how to push in one cycle and so that the properties of the properties are displayed,
as well as their names, without duplication.
Elements must follow each other in layout.
i.e .:
Ring 1
Duration: 50 minutes
Call 2
Duration: 30 minutes
etc. And I have this
Ring 1
Duration: 50 minutes
Call 2
Duration: 50 minutes
Call 1
Duration: 30 minutes
Call 2
Duration: 30 minutes

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question