Answer the question
In order to leave comments, you need to log in
How to make different templates in Bitrix?
There are two templates - for the main and internal pages
In the list of sites I specify index.php according to the condition and for all the others - everything is fine.
But in the template for the main page, my code goes like this
<body>
<header></header>
<section class="очень хочу"></section>
#WORK_AREA#
</body>
, and in the second (for internal)<body>
<header></header>
<main>
#WORK_AREA#
</main>
<aside></aside>
</body>
+ in my main styles, I should have a different indent. Answer the question
In order to leave comments, you need to log in
2 templates = 2 copies of the header, footer, style, ... files.
This is completely solved by moving the styles to a separate directory.
For example (folder structure):
- templates
- .default
- css
- common.css
- front-page
- header.php
- footer.php
- template_styles.css
- other
- header.php
- footer.php
- template_styles.css
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question