E
E
ellengardt2019-06-10 14:01:37
CMS
ellengardt, 2019-06-10 14:01:37

How to display only subcategories without products in Bitrix?

There is a structure.
Home>Services>Subcategories1>Subcategories2>Elements
Subcategory1 should display only Subcategories2 without elements, but now it displays both Subcategories2 and all elements nested in Subcategories2.
Actually the question is: How in Subcategory1 to display only subcategories nested in it without displaying elements.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VicTHOR, 2019-06-10
@ellengardt

$var = CLBlockSection::GetList()
Returns a CLBlockResult object , then work with its methods: $var->GetNextElement()etc. according to the documentation.
Obviously, it is necessary not only to get the list of subcategories, but also to attach links with dependencies on category parameters, respectively, these parameters must be obtained and links should be formed with them in a cycle according to the required style.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question