D
D
Denis2018-03-27 10:56:40
1C-Bitrix
Denis, 2018-03-27 10:56:40

How to redefine the heading of an infoblock section in a component?

Hello. I am using the directory component. For sections on the seo tab, I set the generation of a header of this kind "Buy + section name". To this title, I also need to add the name of the city, which I get through a function in init.php. In the catalog.section template, I tried using $APPLICATION->SetTitle($title) and it doesn't help. Tell me, what other options can you try?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Nikolaev, 2018-03-27
@gromdron

CMain::SetTitle works on the technology of deferred functions , which means that following the order of page execution on the OnEpilog event , you can intercept the value and add a city or change information.
But remember, the event also works in the admin panel, so if you don't want to add a name in the admin panel, use the ADMIN_SECTION constant .

Z
zenWork, 2019-09-04
@martinovdm

$APPLICATION->SetPageProperty('title', 'Page title');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question