Answer the question
In order to leave comments, you need to log in
How to display a property in Bitrix of the “binding to elements” data type?
In the news feed, I created the "Binding to elements" property, in the detailed news I display it like this:
<?foreach($arResult["PROPERTIES"]["AKZII_ELEMENT"]["VALUE"] as $analog):?>
<?$res = CIBlockElement::GetByID($analog);?>
<?if($ar_res = $res->GetNext())?>
if ($ar_props = $db_props->Fetch());?>
<?
$renderImage = CFile::ResizeImageGet($ar_res["PREVIEW_PICTURE"], Array("width" => 200, "height" => 300), BX_RESIZE_IMAGE_EXACT, false);
echo '<img alt="'.$ar_res["NAME"].'" src="'.$renderImage["src"].'" class="person-img img-responsive" />';
?>
<span class="name"><?=$ar_res["NAME"];?></span>
<span class="descr"><?=$ar_res["PREVIEW_TEXT"];?></span>
<?endforeach;?>
<?
if($price['PRICE'] != 0)
{
if (!empty($price))
{
if ($arParams['PRODUCT_DISPLAY_MODE'] === 'N' && $haveOffers)
{
echo Loc::getMessage(
'CT_BCI_TPL_MESS_PRICE_SIMPLE_MODE',
array(
'#PRICE#' => $price['PRINT_RATIO_PRICE'],
'#VALUE#' => $measureRatio,
'#UNIT#' => $minOffer['ITEM_MEASURE']['TITLE']
)
);
}
else
{
echo $price['PRINT_RATIO_PRICE'];
}
}
}
else{
echo 'По запросу';
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question