Answer the question
In order to leave comments, you need to log in
How to correctly place components in a Bitrix template?
How correctly (or what is the principle) to place components in the Bitrix template?
Example: I remake the existing html layout template into a Bitrix template. Divided everything into header.php and footer.php. Now you need to place a banner-slider on the main page and, for example, bestsellers. How it's done?
Do I need to check the place of the call in header.php and, based on this, connect the banner? So? (for example, this index.php is called on the main page, therefore, we include a banner here)
Or is it done in some other way?
And if so, then it turns out that all the output control logic is placed by conditions (if-else) in header.php and footer.php?
Answer the question
In order to leave comments, you need to log in
In header and footer it is better to do without if-s. Better to do:
1) Different templates for different pages (for example, one for the main page, another for the internal ones)
2) Use include areas.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question