D
D
dm2015-02-06 23:22:29
CMS
dm, 2015-02-06 23:22:29

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

2 answer(s)
A
Alexey Emelyanov, 2015-02-06
@Chekhoved

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>

<?}?>

in general, it is better to put the styles in a separate file:
<link rel="stylesheet" type="text/css" href="<?=CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH."/for_index_page.css")?>" />

N
Nikita Ivanov, 2015-02-07
@nikstorm

Here is the source of the template:
Administration->Settings->Sites->Site Templates

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question