P
P
photosho2018-04-17 12:41:23
1C-Bitrix
photosho, 2018-04-17 12:41:23

How to add #SECTION_CODE# to detail page url?

The "DETAIL_PAGE_URL" parameter (the list of articles, the "bitrix:news" component) does not include the symbolic code of the section. The "Detailed view page" parameter is configured as follows:
#SECTION_CODE#/#ELEMENT_CODE#/
If you write
#SECTION_ID#/#ELEMENT_CODE#/
, then the section ID is substituted normally. Maybe I forgot to specify something in the settings of a component or infoblock? I can't find exactly what.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
I'm Yoda, 2018-04-17
@photosho

Do you have a symbolic code for the section?

A
Andrey Eskov, 2020-08-06
@taurus2790

Found this question, but the solution did not help.
Therefore, I will leave an answer about what helped me, maybe it will help someone.
If you do not want to substitute #SECTION_ID# or #SECTION_CODE# in your catalog.section component in the url, but #ELEMENT_ID# and #ELEMENT_CODE# work fine, then you need to pass the parameter 'SHOW_ALL_WO_SECTION' => 'Y' then everything will be fine .
As well as. It is not necessary to prescribe paths in the infoblock settings at all, the main thing is that the correct template is specified in the component. And there was a suitable rule in the urlrewrite.php file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question