Answer the question
In order to leave comments, you need to log in
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
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 .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question