Answer the question
In order to leave comments, you need to log in
What API can be used to get the ADD_URL of an infoblock element?
I can't find how to get ADD_URL via GetList.
Answer the question
In order to leave comments, you need to log in
I'll show you with an example, hopefully what you're looking for:
<?foreach ($arResult['PROPERTIES']['PRODUCT']['VALUE'] as $product_item):?>
<?
$obElement = CIBlockElement::GetByID($product_item);
if($arEl = $obElement->GetNext()) {
if ($arEl["ID"]){
?>
<div class="col-md-6">
<a class="prod-name" href="<?=$arEl['DETAIL_PAGE_URL']?>" title="Подробнее - <?=$arEl['NAME'];?>">
<div class="prod-image" style="background-image: url(<?=CFile::GetPath($arEl['DETAIL_PICTURE']);?>)"></div>
<?=$arEl['NAME'];?>
</a>
</div>
<?
}
}
?>
<?endforeach;?>
There is [ADD_URL] in catalog.element, for example in arResult['OFFERS'] array, there is no need to look it up via API
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question