I
I
Igor Karachentsev2018-02-28 13:33:24
1C-Bitrix
Igor Karachentsev, 2018-02-28 13:33:24

How to leave the section name in breadcrumbs?

There is a section. it is necessary to make sure that when changing the section title in the seo tab, only the title changes (it is h1 in my case), and the section name in the breadcrumbs does not change.
in h1 I insert like this

$ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arResult['IBLOCK_ID'], $arResult['ID']);
        $IPROPERTY = $ipropValues->getValues();
        ?><h1 class="textfon"><?= empty($IPROPERTY['SECTION_PAGE_TITLE']) ? $arResult["NAME"] : $IPROPERTY['SECTION_PAGE_TITLE']; ?></h1>

The same heading is automatically written in breadcrumbs, at least crack. The component template, the component itself is unchanged. I checked the $arResult of breadcrumbs, the name from the seo tab already gets there. How can this be bypassed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Skibin, 2018-02-28
@kucheriavij

Let the name be in breadcrumbs, and put H1 in a separate field for the section. It will be so much easier

S
sybear, 2019-09-26
@sybear

A simple option for your task is to take out the chain formation in component_epilog using getNavChain or your own logic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question