I
I
Ingvar Von Bjork2019-09-13 09:52:45
1C-Bitrix
Ingvar Von Bjork, 2019-09-13 09:52:45

Why doesn't Bitrix display the child element in the loop?

There is this pattern:

<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$this->setFrameMode(true);
?>
<div class="more-news">
<?foreach($arResult["ITEMS"] as $arItem):?>
   <div class="news-item"></div>
<?endforeach;?>
</div>

When the edit mode is turned on, the element is displayed on the page along with all nested ones, and when the edit mode is turned off. then this Bitrix completely ignores displaying only nested ones. What's wrong here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Savrasov, 2019-09-13
@alcorn

It is obvious that somewhere above you do not close the div correctly
. Specifically, in this piece of code, everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question