I
I
IJIL2016-09-09 12:10:51
1C-Bitrix
IJIL, 2016-09-09 12:10:51

How to display content only in a certain section, without subsections?

The news page has a complex component, I need to display certain content only on news, i.e. news/section/ etc. it shouldn't show up anymore.

<?if (CSite::InDir('/news/')):?>
        content
        <?endif?>

This code shows unfortunately also on subsections

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-09-09
@IJIL

There are also two files one for news the second section.
Paste text only in news.php file
joxi.ru/Y2LkLyahnZLaxm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question