Answer the question
In order to leave comments, you need to log in
How to display a section so that it would not disappear when entering it?
Hello!
Wrote the output of sections 1 and 2 levels.
$tree = CIBlockSection::GetTreeList(
$arFilter=Array('IBLOCK_ID' => $iblock['ID'], 'SECTION_ID' => $arParams["CUR_SECTION"], 'CNT_ACTIVE' => true),
$arSelect=Array('*')
);
while($arSection = $tree->GetNext()) {
$cont_element = CIBlockSection::GetSectionElementsCount($arSection["ID"], Array("CNT_ACTIVE"=>"Y"));
?>
<li>
<span class="link"><a href="<?=$arSection['SECTION_PAGE_URL']?>"><?=$arSection['NAME'];?></a></span>
<span class="count"><?=$cont_element?></span>
</li>
<?
}
Answer the question
In order to leave comments, you need to log in
calculate the partition tree separately, without a specific partition filter, and separately an entry with a specific partition filter
PS I hope I understood correctly)
Why didn't catalog.section.list suit you? There you add result_modifier.php in it, add your logic and get the necessary data into the resulting array, then work with this data in the template.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question