V
V
Vasily Pupkin2020-06-08 20:22:46
AJAX
Vasily Pupkin, 2020-06-08 20:22:46

How to get section ID in Bitrix directory with Ajax enabled?

Hello colleagues. I can not overcome one problem in any way.
Site on Bitrix. There is a section, in the index file I prescribe the output of the catalog and the news in detail. I need the news to be displayed ONLY in the root page. It is displayed both in sections and in elements in detail.

<?if($APPLICATION->GetCurDir() == '/bla-bla-bla/'){?>
    );?>

Works every other time, because ajax is enabled in the directory.
As when trying to display $APPLICATION->GetCurDir() and see how the code works, it shows the section correctly only once, on the first visit. All this is clearly related to ajax.
Can anyone tell me how to get the current section in this version?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question