G
G
Greg Plitt2016-06-22 15:31:20
1C-Bitrix
Greg Plitt, 2016-06-22 15:31:20

How do I create content on the main page? Where is everything hidden?

I'm ashamed, but I can't figure out what's going on with my site.
On the main page goo.gl/EMG0Hv (hid from the PS), the video starts automatically and there are 5 content inserts with backgrounds.
But when I open the template (Bitrix--product settings--sites-site templates), I see only the following code there:

<?
    $revision = 26;
    $devRevision = 1;

    // development revision
    if ($USER->IsAdmin()) $revision = $revision . "dev" . $devRevision;

    IncludeTemplateLangFile(__FILE__);

    $htmlClasses = array();
    if ($APPLICATION->GetCurPage() == SITE_DIR) $htmlClasses[] = "main_page";
    if (defined("ERROR_404")) $htmlClasses[] = "error_404";
    if (defined("HOMESTEAD_PAGE")) $htmlClasses[] = "homestead_page";
    if (defined("HOMESTEAD_SUBPAGE")) $htmlClasses[] = "homestead_subpage";
    if (defined("ACTIVITIES_PAGE")) $htmlClasses[] = "activities_page";
    if (defined("ACTIVITIES_SUBPAGE")) $htmlClasses[] = "activities_subpage";
    if (defined("NATURE_PAGE")) $htmlClasses[] = "nature_page";
    if (defined("WORKSHOP_PAGE")) $htmlClasses[] = "workshop_page";
?><!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=LANGUAGE_ID?>" lang="<?=LANGUAGE_ID?>" class="<?=implode(" ", $htmlClasses)?>">
<head>
    <meta charset="utf-8" />
  <meta name="viewport" content="width=980" />
    <title><?$APPLICATION->ShowTitle()?></title>

    <!--[if lt IE 8]>
        <meta http-equiv="refresh" content="0; url=/ie_old/<?=(LANGUAGE_ID=='ru')?'ru':'en'?>.html" />
        <style>.top_side, footer { display: none !important; }</style>
        <script>throw new Error('IE less than 8');</script>
    <![endif]-->

    <!--[if IE 8]>
        <script>document.getElementsByTagName('html')[0].className += ' ie8';</script>
    <![endif]-->

    <!-- Pulled from http://code.google.com/p/html5shiv/ -->
    <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <link rel="stylesheet" type="text/css" href="/bitrix/templates/main/build.css?v=<?=$revision?>" />
    <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <script src="/bitrix/templates/main/build.js?v=<?=$revision?>"></script>
    <script>
        //<![CDATA[
            require(['basics/get_val'], function (getVal) {

                getVal.set('lang', '<?=LANGUAGE_ID?>');
                getVal.set('revision', '<?=$revision?>');
                getVal.set('tplPath', '/bitrix/templates/main');

                require(['main']);

            });
        //]]>
    </script>
  <?if($USER->IsAuthorized()){?>
    <?$APPLICATION->ShowCSS()?>
    <?$APPLICATION->ShowHeadStrings()?>
    <?$APPLICATION->ShowHeadScripts()?>
  <?}?>
</head>

<body><?$APPLICATION->ShowPanel()?>
    <div class="top_side">
        <header>
            <?if ($APPLICATION->GetCurPage() != SITE_DIR){?><a href="/" title="На главную"><?}?>
                <img alt="Усадьба Парфенова" src="/bitrix/templates/main/images/logo.png" width="167" height="80" class="logo" />
            <?if ($APPLICATION->GetCurPage() != SITE_DIR){?></a><?}?>
      <!--<div class="choose_lang"><?
                $site = CSite::GetList();
                while($arSite = $site->GetNext()){
                    if($arSite["LANGUAGE_ID"] == LANGUAGE_ID){?>
                        <span title="Русский"><?=$arSite["LANGUAGE_ID"]?></span><?
                    }else{
                        $href = "http://".$arSite["SERVER_NAME"].$APPLICATION->GetCurPage();?>
                        <a href="<?=$href?>" title="English"><?=$arSite["LANGUAGE_ID"]?></a><?
                    }
                }?>
      </div>-->
            <div class="first_line_wrap">
                <div class="first_line">
                    <nav class="main_menu"><?$APPLICATION->IncludeComponent("bitrix:menu", "menu.top", Array(
    "ROOT_MENU_TYPE" => "top",    // Тип меню для первого уровня
    "MENU_CACHE_TYPE" => "A",    // Тип кеширования
    "MENU_CACHE_TIME" => "3600",    // Время кеширования (сек.)
    "MENU_CACHE_USE_GROUPS" => "Y",    // Учитывать права доступа
    "MENU_CACHE_GET_VARS" => array(    // Значимые переменные запроса
        0 => "",
    ),
    "MAX_LEVEL" => "1",    // Уровень вложенности меню
    "CHILD_MENU_TYPE" => "",    // Тип меню для остальных уровней
    "USE_EXT" => "Y",    // Подключать файлы с именами вида .тип_меню.menu_ext.php
    "DELAY" => "N",    // Откладывать выполнение шаблона меню
    "ALLOW_MULTI_SELECT" => "N",    // Разрешить несколько активных пунктов одновременно
    ),
    false
);?>
                    </nav>
                </div>
            </div>
            <nav class="sub_menu"><?$APPLICATION->IncludeComponent("bitrix:menu", "menu.sub", Array(
    "ROOT_MENU_TYPE" => "sub",    // Тип меню для первого уровня
    "MENU_CACHE_TYPE" => "A",    // Тип кеширования
    "MENU_CACHE_TIME" => "3600",    // Время кеширования (сек.)
    "MENU_CACHE_USE_GROUPS" => "Y",    // Учитывать права доступа
    "MENU_CACHE_GET_VARS" => array(    // Значимые переменные запроса
        0 => "",
    ),
    "MAX_LEVEL" => "1",    // Уровень вложенности меню
    "CHILD_MENU_TYPE" => "",    // Тип меню для остальных уровней
    "USE_EXT" => "Y",    // Подключать файлы с именами вида .тип_меню.menu_ext.php
    "DELAY" => "N",    // Откладывать выполнение шаблона меню
    "ALLOW_MULTI_SELECT" => "N",    // Разрешить несколько активных пунктов одновременно
    ),
    false
);?>
            </nav>
        </header>
    <?if (defined("NATURE_PAGE") || defined("WORKSHOP_PAGE")) {?>
      <nav class="menu_left_top">
<?$APPLICATION->IncludeComponent(
  "bitrix:menu",
  "menu.left.top",
  Array(
    "ROOT_MENU_TYPE" => "left_bottom",
    "MENU_CACHE_TYPE" => "A",
    "MENU_CACHE_TIME" => "3600",
    "MENU_CACHE_USE_GROUPS" => "Y",
    "MENU_CACHE_GET_VARS" => array(""),
    "MAX_LEVEL" => "1",
    "CHILD_MENU_TYPE" => "",
    "USE_EXT" => "Y",
    "DELAY" => "N",
    "ALLOW_MULTI_SELECT" => "N"
  )
);?>
      </nav>
    <?}?>
    <?if (defined("PAGE_TITLE")) {?><h1 class="page_title"><?$APPLICATION->ShowTitle()?></h1><?}?>
        <?if (!defined("NO_MAIN_WRAPPER")) {?><main><?}?>
        <?if (defined("CONTENT_PAGE")) {?><section class="content"><?}?>
#WORK_AREA#        <?if (defined("CONTENT_PAGE")) {?></section><?}?>
        <?if (!defined("NO_MAIN_WRAPPER")) {?></main><?}?>
    </div><!--.top_side-->
    <footer>
        <div class="contacts">
            <?$APPLICATION->IncludeFile(
                "inc/tmpl/footer_contacts_".LANGUAGE_ID.".php",
                array(),
                array(
                    "SHOW_BORDER" => false
                )
            );?>
        </div>
        <div class="developer">
            <?=GetMessage("TMPL_CREATED_BY")?>
        </div>
    </footer>
    <?$APPLICATION->IncludeFile(
            "inc/tmpl/counter.php",
            array(),
            array(
                "SHOW_BORDER" => false
            )
    );?>
</body>
</html>

Moreover, if I open it with the chrome / fox inspector, then I see the code I need. I see how video and other blocks are displayed here.
Now I need to redo the main page and I don't understand where to do it?
Everything is complicated by the fact that I don’t even have the inc/tmpl/ folder on the server, and here in the code it is clearly visible that inserts are coming from it.
Look please. For example, how do I change at least the URL of a video? Where is it hidden?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2016-06-22
@alexey-m-ukolov

Study the official Bitrix courses , everything is told there.
You are looking at the site template, but apparently you need to edit the page, and most likely - some kind of component in general.

I don't even have the inc/tmpl/ folder on my server
A relative path is used, so the folder is in the same place as the template.

A
Alexey Cheremisin, 2016-06-22
@leahch

Welcome to Bitrix :-D
$APPLICATION->IncludeComponent(...);Connects a component that has its own templates (html+php), php-code, javascript and more. In this place of the page, what is the result of the execution of the component code is inserted. Yes: components can be complex and include a bunch of other components, for this you need to get into the code and templates of the corresponding component.
$APPLICATION->IncludeFile(...);Includes an additional file, similar to the include directive in PHP, but can also pass parameters there.
As for the rest, yes, you need to watch the Lessons and read the Bitrix Documentation.
All the horrors of programming are there in action, with crooked architecture and bad style. But he is the most adored by customers and "a lot of things can be done" on him.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question