Answer the question
In order to leave comments, you need to log in
How to prevent display of header on index.php?
Good afternoon!
Tell me how to disable the display of the title <?=$APPLICATION->ShowTitle(false);?> on the main page of the site, and allow it on internal pages.
<?=$APPLICATION->ShowTitle(false);?> in header.php
Answer the question
In order to leave comments, you need to log in
You can check the current url of the page and if it is the main page, do not display the title.
Current directory:
dev.1c-bitrix.ru/api_help/main/reference/cmain/get...
Current
page:
dev.1c-bitrix.ru/api_help/main/reference/cmain/get...
which you do not need to display the header, there may be several, so as not to climb every time in the header, we track not the url, but some kind of variable.
For example:
if ( !defined ( "SKIP_TITLE" ) ) {
$APPLICATION->ShowTitle(false);
}
define( "SKIP_TITLE", true );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question