Answer the question
In order to leave comments, you need to log in
How to display a section image in the header?
Tell me, is there a header where breadcrumbs and a title are displayed
<section class="smt-page-header">
<div class="smt-page-header__overlay">
<div class="smt-page-header__inner">
<div class="container">
<header>
<h1 class="smt-page-header__header"><?=$APPLICATION->ShowTitle(false)?></h1>
</header>
<div class="smt-page-header__breadcrumb">
<?$APPLICATION->IncludeComponent(
"bitrix:breadcrumb",
"smt_breadcrumb",
Array(
"START_FROM" => "0",
"PATH" => "",
"SITE_ID" => "-"
)
);?>
</div>
</div>
</div>
</div>
</section>
Answer the question
In order to leave comments, you need to log in
1. In header.php
<section class="smt-page-header" style="background-image: url(<?$APPLICATION->ShowProperty('SECTION_BACKGROUND');?>);">
тут блок с заголовком
</section>
$component = $this->getComponent();
$component->SetResultCacheKeys(array('PICTURE'));
$APPLICATION->SetPageProperty('SECTION_BACKGROUND', $arResult['PICTURE']['SRC']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question