<div class="menu">
<div class="menu__list">
<? foreach ($arResult["SECTIONS"] as $arSection): ?>
<div class="menu__item"><a class="menu__link" href="<?=$arSection["SECTION_PAGE_URL"]?>">
<div class="menu__img">
<?
$db_list = CIBlockSection::GetList(Array($by=>$order), $arFilter = Array("IBLOCK_ID"=>$arParams["IBLOCK_ID"], "ID"=>$arResult['SECTIONS']), true,$arSelect=Array("UF_ICON"));
while($ar_result = $db_list->GetNext()) {
$arResult["UF_ICON"][$ar_result["ID"]] = CFile::GetPath
($ar_result["UF_ICON"]);
}
?>
<?php
echo file_get_contents($_SERVER['DOCUMENT_ROOT']
. $arResult['UF_ICON'][$arSection['ID']]); ?>
</div>
<div class="menu__title"><?=$arSection["NAME"]?></div>
<svg class="menu__svg">
<use xlink:href="<?=SITE_TEMPLATE_PATH?>/images/icons/sprite.svg#angle-r"></use>
</svg>
</a>
<div class="submenu">
<?
$res = CIBlockSection::GetList(
Array('name' => 'asc'),
Array('IBLOCK_ID' =>'5' , 'ACTIVE' => 'Y')
);
while ($row = $res->GetNext())
{
$rsParentSection = CIBlockSection::GetByID($row['ID']);
if ($arParentSection = $rsParentSection->GetNext())
{
$arFilter = array('IBLOCK_ID' => $arParentSection['IBLOCK_ID'],'>LEFT_MARGIN' => $arParentSection['LEFT_MARGIN'],'<RIGHT_MARGIN' => $arParentSection['RIGHT_MARGIN'],'>DEPTH_LEVEL' => $arParentSection['DEPTH_LEVEL']); // выберет потомков без учета активности
$rsSect = CIBlockSection::GetList(array('left_margin' => 'asc'),$arFilter);
while ($arSect = $rsSect->GetNext())
{ ?>
<a class="submenu__item" href="<?=$arSection["SECTION_PAGE_URL"]?>"><?=$arSect['NAME']?> </a>
<? }
}
}
?>
</div>
</div>
<? endforeach; ?>
</div>
</div>
А если убрать cover, то фон не на всю высоту