Answer the question
In order to leave comments, you need to log in
Where is the html of the main page in Bitrix?
On the site, on all pages except the main one, you need to change the background. Site on Bitrix. The main page only needs to change the code a bit, but I can't find it. css is there but html is not. Where to look for the file with the source code of the main one in Bitrix?
Answer the question
In order to leave comments, you need to log in
The body of the main page is here $_SERVER['DOCUMENT_ROOT'].'/index.php'.
If you need to add styles only for the main page of the site, then the easiest way is to add a condition to the site template:
<?php
$curPage = $APPLICATION->GetCurPage(true);
if (
$curPage == SITE_DIR."index.php"
){?>
<style type="text/css">
<!--
стили для главной страницы
-->
</style>
<?}?>
<link rel="stylesheet" type="text/css" href="<?=CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH."/for_index_page.css")?>" />
Here is the source of the template:
Administration->Settings->Sites->Site Templates
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question