Answer the question
In order to leave comments, you need to log in
How to make the same header and footer for all site templates?
There are 3 templates on the site, how to implement so that for all templates the header and footer of the site are displayed the same (+ the header and footer have their own styles)?
(so you don't have to go into each template and edit the header in it..)
Answer the question
In order to leave comments, you need to log in
I make a general .default template, and in the rest of the templates in the header:
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();?>
<?include(S_P_LAYOUT.'/header.php');?>
<div class="page">
<!-- HEADER :: START-->
<header class="header">
<div class="container">
<div class="header__wrapper">
<a class="header__logo" href="#"><img src="<?=P_IMAGES?>/logotype.svg" alt=""></a>
<?include(S_P_INCLUDES.'/menu-top.php');?>
<div class="header__links">
<?include(S_P_INCLUDES.'/menu-links.php');?>
</div>
<button class="hamburger hamburger--spin" type="button" js-hamburger><span class="hamburger-box"><span class="hamburger-inner"></span></span></button>
</div>
</div>
</header>
<!-- HEADER :: END-->
<div class="page__content">
<?$APPLICATION->ShowPanel()?>
какой-то отличающийся код
<?include(S_P_LAYOUT.'/footer.php');?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question