N
N
Nadezhda Golovina2021-01-25 16:09:05
1C-Bitrix
Nadezhda Golovina, 2021-01-25 16:09:05

How to display section names in Bitrix in Product Announcement?

One site migrated under my department. Essence of the question:
There are these sections marked in the Element (1 screen)
600ec02d9969e912937496.png
They must be displayed in the Product Announcement on the site (2 screen)
600ec05dde580472603422.png
I note that some of the solutions, crutches on the site do not work.
For example, it doesn't work here

<p><?echo $arResult["SECTION"]["PATH"][0]["NAME"]?></p>

But on another site got up without problems.
We need a solution that will display exactly the title of the section where the user is currently. Therefore, they must change with each other.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadezhda Golovina, 2021-06-21
@Golovina90

In this case, this option worked from colleagues:

<!-- Наименование раздела -->
<? if ($arResult['SECTION_H1']) { ?>
  <p class="product-item-title product-item-title-2"><?=$arResult['SECTION_H1']?></p>
<? } ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question