Найти в Дзене
Всем полезное

Как сделать активный раздел другим цветом в catalog.section.list

<?

//проверяем на активность

$cur_page = $APPLICATION->GetCurPage(false);

$is_active = ($arItem['SECTION_PAGE_URL'] == $cur_page || strpos($cur_page,$arItem['SECTION_PAGE_URL'])!==false)?" active":"";

?>

<a

href="<?= $arItem['SECTION_PAGE_URL'] ?>"

class="button button--underline catalog-aside-list-item__link<?if($is_active):?> active<?endif;?>"

>

<?= $arItem['NAME'] ?>

</a>