As adding the class active to the active record of the information block Bitrix?

It is necessary that of the information block news, entries were displayed as slides in the slider. The problem is that the active slide in the bootstrap carousel is a must attend class active. How can I add the php. Without the class of the active slides are displayed.
The standard output of the carousel:
<div id="myCarousel" class="carousel slide">
 <!-- Carousel items -->
 <div class="carousel-inner">
 <div class="active item">...</div>
 <div class="item">...</div>
 <div class="item">...</div>
</div>
 <!-- Carousel nav -->
 <a class="carousel-control left" href="#myCarousel" data-slide="prev">"</a>
 <a class="carousel-control right" href="#myCarousel" data-slide="next">"</a>
</div>
July 2nd 19 at 17:58
1 answer
July 2nd 19 at 18:00
Solution
What exactly is the problem?

In the component template, which displays the news file template.php add a condition that if it is the first element of the array, then it add the class active.

Find more questions by tags Bootstrap1C-BitrixPHP