Answer the question
In order to leave comments, you need to log in
How in Bitrix not to display in the detailed news, not active related elements?
There are two infoblocks, and in one of them, in the detailed news, I display related elements from another infoblock, but all are displayed, but I need not to display inactive ones, how can I do this?
<ul class="capabilities-schedule__modules">
<?$programCourseItemCounter = 1;?>
<?foreach ($arResult['PROGRAM_COURSE_ITEMS'] as $keyProgramCourseItem => $arProgramCourseItem):?>
<li class="capabilities-schedule__module">
<input class="capabilities-schedule__switch-input" type="checkbox" id="capabilities-schedule__switch-input-<?=$programCourseItemCounter?>" wfd-invisible="true">
<label class="capabilities-schedule__module-title" for="capabilities-schedule__switch-input-<?=$programCourseItemCounter?>">
<p class="capabilities-schedule__module-num"><?=$programCourseItemCounter?> модуль</p>
<span class="capabilities-schedule__module-name"><?=$arProgramCourseItem['NAME']?></span>
</label>
<div class="capabilities-schedule__collapsed-content">
<div class="capabilities-schedule__timetable">
<div class="capabilities-schedule__months capabilities-schedule__months--short"><?=$arProgramCourseItem['MODULE_TIME']?></div>
<ul class="capabilities-schedule__months capabilities-schedule__months--full">
<?foreach ($arProgramCourseItem['SCHEDULE_ITEMS']['MONTH'] as $month => $items):?>
<li class="capabilities-schedule__month">
<div class="capabilities-schedule__month-name"><?=$arResult['MONTHS'][$month]?></div>
<ul class="capabilities-schedule__days">
<?foreach ($items as $item):?>
<li class="capabilities-schedule__day">
<?if ($item['START_DATE']['DAY'] && $item['START_DATE']['MONTH']):?>
<span class="capabilities-schedule__date">
<span class="capabilities-schedule__date-day"><?=$item['START_DATE']['DAY']?></span>
<span class="capabilities-schedule__date-divider">/</span>
<span class="capabilities-schedule__date-month"><?=$item['START_DATE']['MONTH']?></span>
</span>
<?endif;?>
<span class="capabilities-schedule__day-text <?if ($item['NAME_ITALICS']):?>capabilities-schedule__day-text--italic<?endif;?>"><?=$item['NAME']?></span>
</li>
<?endforeach;?>
</ul>
</li>
<?endforeach;?>
</ul>
</div>
<?if ($arProgramCourseItem['COMMON_INFO']):?>
<div class="capabilities-schedule__info">
<div class="capabilities-schedule__info-icon"></div>
<ul class="capabilities-schedule__info-list">
<?foreach ($arProgramCourseItem['COMMON_INFO'] as $keyCommonInfoItem => $arCommonInfoItem):?>
<li class="capabilities-schedule__info-item"><?=$arCommonInfoItem['TEXT']?></li>
<?endforeach;?>
</ul>
</div>
<?endif;?>
</div>
</li>
<?$programCourseItemCounter++;?>
<?endforeach;?>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question