Answer the question
In order to leave comments, you need to log in
How to display the section name from $arResult['SECTIONS'] in the product card?
get
$arResult['SECTIONS'] = IblockQuery::sections()
->filter([
"ACTIVE" => "Y",
'IBLOCK_ID' => $arParams['IBLOCK_ID'],
'SECTION_ID' => $arParams['SECTION_ID'],
])->execute()->all();
<? foreach ($arResult['SECTIONS'] as $arSection):?>
<a href="#" class="card__button"><span><?= $arSection["NAME"];?></span></a>
<?endforeach;?>
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